diff --git a/src/app/social/[userId]/followees/layout.tsx b/src/app/social/[userId]/followees/layout.tsx deleted file mode 100644 index cdb3ce2c..00000000 --- a/src/app/social/[userId]/followees/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { PropsWithChildren } from 'react'; - -import TopBar from '@/src/components/Topbar'; - -const FolloweesLayout = ({ children }: PropsWithChildren) => { - return ( - <> - - - 팔로잉 - - -
{children}
- - ); -}; - -export default FolloweesLayout; diff --git a/src/app/social/followees/layout.tsx b/src/app/social/followees/layout.tsx deleted file mode 100644 index cdb3ce2c..00000000 --- a/src/app/social/followees/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { PropsWithChildren } from 'react'; - -import TopBar from '@/src/components/Topbar'; - -const FolloweesLayout = ({ children }: PropsWithChildren) => { - return ( - <> - - - 팔로잉 - - -
{children}
- - ); -}; - -export default FolloweesLayout; diff --git a/src/app/social/followers/layout.tsx b/src/app/social/followers/layout.tsx deleted file mode 100644 index e4e3b304..00000000 --- a/src/app/social/followers/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { PropsWithChildren } from 'react'; - -import TopBar from '@/src/components/Topbar'; - -const FollowersLayout = ({ children }: PropsWithChildren) => { - return ( - <> - - - 팔로워 - - -
{children}
- - ); -}; - -export default FollowersLayout; diff --git a/src/app/social/[userId]/followers/layout.tsx b/src/app/social/layout.tsx similarity index 59% rename from src/app/social/[userId]/followers/layout.tsx rename to src/app/social/layout.tsx index e4e3b304..bfe321de 100644 --- a/src/app/social/[userId]/followers/layout.tsx +++ b/src/app/social/layout.tsx @@ -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 ( <> - 팔로워 + {pathDict[a]}
{children}