import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; import { styled } from '@/styles'; import { Empty } from '@/ui/empty'; import { useRouter } from 'next/router'; import { useEffect, useState } from 'react'; // const User = ({ name, avatar }: { name: string; avatar?: string }) => { // return ( // // {avatar ? ( // // ) : ( // {name.slice(0, 1)} // )} // {name} // // ); // }; export default function DevPage() { const router = useRouter(); const [successInvited, setSuccessInvited] = useState(false); const { acceptInvite } = useWorkspaceHelper(); useEffect(() => { router.query.invite_code && acceptInvite(router.query.invite_code as string).then(data => { if (data && data.accepted) { setSuccessInvited(true); } }); }, [router, acceptInvite]); return (
{/* TODO add inviteInfo*/} {/* invited */} {/* you to join */} {/* */} {successInvited ? ( Successfully joined ) : ( The link has expired )}
); } // const UserIcon = styled('div')({ // display: 'inline-block', // width: '28px', // height: '28px', // borderRadius: '50%', // backgroundColor: '#FFF5AB', // textAlign: 'center', // color: '#896406', // lineHeight: '28px', // }); const Invited = styled('div')(({ theme }) => { return { height: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center', textAlign: 'center', color: theme.colors.textColor, backgroundColor: theme.colors.pageBackground, }; }); const Content = styled('div')({ fontSize: '16px', marginTop: '35px', }); const Status = styled('div')(() => { return { marginTop: '16px', svg: { verticalAlign: 'middle', marginRight: '12px', }, }; });