mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Uses react-intersection-observer to load more comments when the last of the previously loaded comments is in the viewport.
14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
import useUser from '@/hooks/useUser';
|
|
import GetUserSchema from '@/services/User/schema/GetUserSchema';
|
|
import { createContext } from 'react';
|
|
import { z } from 'zod';
|
|
|
|
const UserContext = createContext<{
|
|
user?: z.infer<typeof GetUserSchema>;
|
|
error?: unknown;
|
|
isLoading: boolean;
|
|
mutate?: ReturnType<typeof useUser>['mutate'];
|
|
}>({ isLoading: true });
|
|
|
|
export default UserContext;
|