-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): improve user experience
- Loading branch information
Showing
11 changed files
with
87 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Page() { | ||
return 'çöplükler'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use client'; | ||
|
||
import Link from 'next/link'; | ||
import { usePathname } from 'next/navigation'; | ||
import { motion, AnimatePresence } from 'framer-motion'; | ||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; | ||
|
||
export default function LayoutContent({ children }) { | ||
const pathname = usePathname(); | ||
const path = pathname.split('/')[3]; | ||
|
||
return ( | ||
<Tabs value={path}> | ||
<TabsList className='grid w-full grid-cols-3'> | ||
<TabsTrigger value='posts' asChild> | ||
<Link href='/app/explore/posts'>çöpler</Link> | ||
</TabsTrigger> | ||
<TabsTrigger value='guilds' asChild> | ||
<Link href='/app/explore/guilds'>çöplükler</Link> | ||
</TabsTrigger> | ||
<TabsTrigger value='users' asChild> | ||
<Link href='/app/explore/users'>çöpçüler</Link> | ||
</TabsTrigger> | ||
</TabsList> | ||
<AnimatePresence mode='wait'> | ||
<motion.div | ||
key={path} | ||
initial={{ y: 20, opacity: 0 }} | ||
animate={{ y: 0, opacity: 1 }} | ||
transition={{ ease: 'easeInOut', duration: 0.3 }} | ||
> | ||
<TabsContent value='posts'>{children}</TabsContent> | ||
<TabsContent value='guilds'>{children}</TabsContent> | ||
<TabsContent value='users'>{children}</TabsContent> | ||
</motion.div> | ||
</AnimatePresence> | ||
</Tabs> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import LayoutContent from "@/app/app/explore/layout-content"; | ||
|
||
export const metadata = { | ||
title: 'keşfet' | ||
}; | ||
|
||
export default function Layout({ children }) { | ||
return children; | ||
return <LayoutContent>{children}</LayoutContent>; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use client'; | ||
|
||
import PostList from '@/components/app/Post/List'; | ||
import { getPosts } from '@/lib/api/posts'; | ||
|
||
export default function Page() { | ||
const fetchPosts = async (offset) => { | ||
return await getPosts(11, offset); | ||
}; | ||
|
||
return ( | ||
<PostList fetchPosts={fetchPosts} /> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use client'; | ||
|
||
import UserList from '@/components/app/User/List'; | ||
import { getUsers } from '@/lib/api/users'; | ||
|
||
export default function Page() { | ||
const fetchUsers = async (offset) => { | ||
return await getUsers(11, offset); | ||
}; | ||
|
||
return <UserList fetchUsers={fetchUsers} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters