diff --git a/client/app/(auth)/login/page.jsx b/client/app/(auth)/login/page.jsx index 7cd7056..80a31f9 100644 --- a/client/app/(auth)/login/page.jsx +++ b/client/app/(auth)/login/page.jsx @@ -4,7 +4,7 @@ import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { useState } from 'react'; import { zodResolver } from '@hookform/resolvers/zod'; -import { set, useForm } from 'react-hook-form'; +import { useForm } from 'react-hook-form'; import { z } from 'zod'; import { LoaderCircle } from 'lucide-react'; import { Button } from '@/components/ui/button'; diff --git a/client/app/app/explore/layout.jsx b/client/app/app/explore/layout.jsx index 175635b..50cd923 100644 --- a/client/app/app/explore/layout.jsx +++ b/client/app/app/explore/layout.jsx @@ -1,4 +1,4 @@ -import LayoutContent from "@/app/app/explore/layout-content"; +import LayoutContent from '@/app/app/explore/layout-content'; export const metadata = { title: 'keşfet' diff --git a/client/components/app/Post/List.jsx b/client/components/app/Post/List.jsx index 353f400..39b0f15 100644 --- a/client/components/app/Post/List.jsx +++ b/client/components/app/Post/List.jsx @@ -8,6 +8,7 @@ export default function PostList({ fetchPosts }) { const [posts, setPosts] = useState([]); const [offset, setOffset] = useState(10); const [hasMorePost, setHasMorePost] = useState(true); + const [loading, setLoading] = useState(false); const { toast } = useToast(); const handleDelete = (postId) => { @@ -42,6 +43,7 @@ export default function PostList({ fetchPosts }) { useEffect(() => { const fetchInitialPosts = async () => { + setLoading(true); const response = await fetchPosts(0); if (!response) { @@ -62,6 +64,8 @@ export default function PostList({ fetchPosts }) { setPosts(initialPosts); setHasMorePost(false); } + + setLoading(false); }; fetchInitialPosts(); @@ -69,7 +73,10 @@ export default function PostList({ fetchPosts }) { return (