add user context and likes

This commit is contained in:
Aaron William Po
2023-02-08 07:43:59 -05:00
parent 20000cc4af
commit f6880deeb6
12 changed files with 300 additions and 47 deletions

View File

@@ -1,11 +1,13 @@
import Layout from '@/components/ui/Layout';
import Spinner from '@/components/ui/Spinner';
import withPageAuthRequired from '@/config/auth/withPageAuthRequired';
import useUser from '@/hooks/useUser';
import { GetServerSideProps, NextPage } from 'next';
import { useContext } from 'react';
import UserContext from '../contexts/userContext';
const ProtectedPage: NextPage = () => {
const { user, isLoading, error } = useUser();
const { user, error, isLoading } = useContext(UserContext);
return (
<Layout>