mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Implement react-intersection-observer to facilitate infinite scroll
Uses react-intersection-observer to load more comments when the last of the previously loaded comments is in the viewport.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import useUser from '@/hooks/useUser';
|
||||
import useUser from '@/hooks/useUser';
|
||||
import GetUserSchema from '@/services/User/schema/GetUserSchema';
|
||||
import { createContext } from 'react';
|
||||
import { z } from 'zod';
|
||||
@@ -7,7 +7,7 @@ const UserContext = createContext<{
|
||||
user?: z.infer<typeof GetUserSchema>;
|
||||
error?: unknown;
|
||||
isLoading: boolean;
|
||||
mutate?: ReturnType<typeof useUser>['mutate']
|
||||
mutate?: ReturnType<typeof useUser>['mutate'];
|
||||
}>({ isLoading: true });
|
||||
|
||||
export default UserContext;
|
||||
|
||||
Reference in New Issue
Block a user