Skip to content

Commit

Permalink
refactor: social 페이지 레이아웃 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
HoberMin committed Jul 14, 2024
1 parent 63bb8f4 commit 52c98c4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 55 deletions.
18 changes: 0 additions & 18 deletions src/app/social/[userId]/followees/layout.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/social/followees/layout.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/social/followers/layout.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
'use client';

import { PropsWithChildren } from 'react';

import { usePathname } from 'next/navigation';

import TopBar from '@/src/components/Topbar';

const pathDict = {
followers: '팔로워',
followees: '팔로잉',
};

const FollowersLayout = ({ children }: PropsWithChildren) => {
const a = usePathname()?.split('/').pop() as keyof typeof pathDict;

return (
<>
<TopBar.Container>
<TopBar.BackButton href='/' />
<TopBar.Title>팔로워</TopBar.Title>
<TopBar.Title>{pathDict[a]}</TopBar.Title>
<TopBar.NavMore />
</TopBar.Container>
<div className='px-4 py-2'>{children}</div>
Expand Down

0 comments on commit 52c98c4

Please sign in to comment.