Skip to content

Instantly share code, notes, and snippets.

@aquinq
Last active December 2, 2024 10:55
import React from 'react';
import Upcoming from './upcoming';
import Started from './started';
type MeetingProps = {
startsAt: Date;
};
const Meeting = ({ startsAt }: MeetingProps) => {
const now = new Date();
const isUpcoming = now.getTime() < startsAt.getTime();
return isUpcoming ? <Upcoming /> : <Started />;
};
export default Meeting;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment