diff --git a/src/App.tsx b/src/App.tsx index 1fdb2d8..236857d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import { Navigate, Route, Routes } from 'react-router-dom'; import ExplorePage from './pages/ExplorePage'; import LoginPage from './pages/LoginPage'; import MainPage from './pages/MainPage'; +import ProfilePage from './pages/ProfilePage'; export type LoginContextType = { isLoggedIn: boolean; @@ -39,11 +40,15 @@ export const App = () => { ) } - > + /> : } - > + /> + : } + /> ); diff --git a/src/components/Hilghlights.tsx b/src/components/Hilghlights.tsx new file mode 100644 index 0000000..f335f93 --- /dev/null +++ b/src/components/Hilghlights.tsx @@ -0,0 +1,26 @@ +import React from 'react'; + +type HighlightItemProps = { + name: string; +}; + +const HighlightItem = ({ name }: HighlightItemProps) => ( +
+
+ {name} +
+); + +const Highlights: React.FC = () => { + const highlights = ['test1', 'test2', 'test3']; + + return ( +
+ {highlights.map((highlight, index) => ( + + ))} +
+ ); +}; + +export default Highlights; diff --git a/src/components/MobileBar.tsx b/src/components/MobileBar.tsx index 11c4169..a2ccf31 100644 --- a/src/components/MobileBar.tsx +++ b/src/components/MobileBar.tsx @@ -1,5 +1,6 @@ import { Heart, Home, PlusSquare, Search, User } from 'lucide-react'; import React from 'react'; +import { Link } from 'react-router-dom'; interface NavItemProps { icon: React.ReactNode; @@ -14,11 +15,15 @@ const NavItem = ({ icon }: NavItemProps) => ( const BottomBar = () => { return ( ); }; diff --git a/src/components/PostGrid.tsx b/src/components/PostGrid.tsx new file mode 100644 index 0000000..48e56d3 --- /dev/null +++ b/src/components/PostGrid.tsx @@ -0,0 +1,13 @@ +const PostGrid = () => { + const posts = Array(4).fill(null); + + return ( +
+ {posts.map((_, index) => ( +
+ ))} +
+ ); +}; + +export default PostGrid; diff --git a/src/components/ProfileInfo.tsx b/src/components/ProfileInfo.tsx new file mode 100644 index 0000000..6fd7e32 --- /dev/null +++ b/src/components/ProfileInfo.tsx @@ -0,0 +1,57 @@ +import { Settings } from 'lucide-react'; + +type ProfileInfoProps = { + username: string; + posts: number; + followers: number; + following: number; + fullName: string; + bio: string; +}; + +const ProfileInfo = ({ + username, + posts, + followers, + following, + fullName, + bio, +}: ProfileInfoProps) => { + return ( +
+
+ {username} +
+
+

{username}

+ + +
+
+ + {posts} posts + + + {followers} followers + + + {following} following + +
+
+
+
+

{fullName}

+

{bio}

+
+
+ ); +}; + +export default ProfileInfo; diff --git a/src/components/ProfileTabs.tsx b/src/components/ProfileTabs.tsx new file mode 100644 index 0000000..89d5439 --- /dev/null +++ b/src/components/ProfileTabs.tsx @@ -0,0 +1,35 @@ +import { Bookmark, Grid } from 'lucide-react'; +import { useState } from 'react'; + +import PostGrid from './PostGrid'; + +const ProfileTabs = () => { + const [activeTab, setActiveTab] = useState('posts'); + + return ( +
+
+ + +
+ {activeTab === 'posts' && } + {activeTab === 'saved' &&
저장됨
} +
+ ); +}; + +export default ProfileTabs; diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 107eb18..c61a12f 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -8,6 +8,7 @@ import { User, } from 'lucide-react'; import React, { useContext } from 'react'; +import { Link } from 'react-router-dom'; import { LoginContext, type LoginContextType } from '../App'; @@ -43,12 +44,16 @@ const Sidebar = () => { Instagram
- } label="Home" active /> + + } label="Home" active /> + } label="Search" active={false} /> } label="Explore" active={false} /> } label="Notifications" active={false} /> } label="Create" active={false} /> - } label="Profile" active={false} /> + + } label="Profile" active={false} /> +