Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/app/message/chat/page.tsx

This file was deleted.

18 changes: 15 additions & 3 deletions src/app/message/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { FollowingList, FollowingSearch } from '@/components/pages/message';
'use client';

import { useSearchParams } from 'next/navigation';

import { Chat, FollowingList, FollowingSearch } from '@/components/pages/message';
import { TabNavigation } from '@/components/shared';

const SOCIAL_TABS = [
Expand Down Expand Up @@ -28,11 +32,19 @@ const FOLLOWING_LIST = [
];

export default function FollowingPage() {
const params = useSearchParams();
const tab = params.get('tab') || 'following';
return (
<div className='min-h-screen bg-[#F1F5F9]'>
<TabNavigation basePath='/message' tabs={SOCIAL_TABS} />
<FollowingSearch />
<FollowingList items={FOLLOWING_LIST} />

{tab === 'chat' && <Chat />}
{tab === 'following' && (
<>
<FollowingSearch />
<FollowingList items={FOLLOWING_LIST} />
</>
)}
</div>
);
}
3 changes: 3 additions & 0 deletions src/components/pages/message/chat/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const Chat = () => {
return <>채팅 컴포넌트</>;
};
1 change: 1 addition & 0 deletions src/components/pages/message/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { Chat } from './chat';
export { FollowingCard } from './message-following-card';
export { FollowingList } from './message-following-list';
export { FollowingSearch } from './message-following-search';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import { Icon } from '@/components/icon';
import { Button, ModalContent, ModalTitle, useModal } from '@/components/ui';
import { Button, Input, ModalContent, ModalTitle, useModal } from '@/components/ui';

const FollowerModal = () => {
const { close } = useModal();
Expand All @@ -15,8 +15,9 @@ const FollowerModal = () => {
return (
<ModalContent>
<ModalTitle className='mb-3'>팔로우 할 닉네임을 입력하세요</ModalTitle>
<input
<Input
className='text-text-sm-medium mb-3 w-full rounded-3xl bg-gray-100 px-4 py-2.5 text-gray-800'
iconButton={<Icon id='search' className='absolute top-2.5 right-3 size-5 text-gray-500' />}
placeholder='nickname'
onKeyDown={(e) => {
if (e.key === 'Enter') {
Expand Down