import Spinner from '@/components/ui/Spinner'; import withPageAuthRequired from '@/getServerSideProps/withPageAuthRequired'; import UserContext from '@/contexts/userContext'; import { GetServerSideProps, NextPage } from 'next'; import { useContext } from 'react'; import useMediaQuery from '@/hooks/useMediaQuery'; const ProtectedPage: NextPage = () => { const { user, isLoading } = useContext(UserContext); const currentTime = new Date().getHours(); const isMorning = currentTime >= 3 && currentTime < 12; const isAfternoon = currentTime >= 12 && currentTime < 18; const isEvening = currentTime >= 18 || currentTime < 3; const isDesktop = useMediaQuery('(min-width: 768px)'); return (