-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
155 additions
and
98 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 |
---|---|---|
@@ -1,75 +1,53 @@ | ||
"use client"; | ||
import { useState } from "react"; | ||
import Image from "next/image"; | ||
import "../../style/mypage.scss"; | ||
import SettingsIcon from "@mui/icons-material/Settings"; | ||
import AccountCircleOutlinedIcon from "@mui/icons-material/AccountCircleOutlined"; | ||
import GridOnOutlinedIcon from "@mui/icons-material/GridOnOutlined"; | ||
import GridOnIcon from "@mui/icons-material/GridOn"; | ||
import FavoriteBorderOutlinedIcon from "@mui/icons-material/FavoriteBorderOutlined"; | ||
import FavoriteIcon from "@mui/icons-material/Favorite"; | ||
import Menubar from "@/component/MenuBar"; | ||
import TabBar from "@/component/TabBar"; | ||
import Profile from "@/component/Profile"; | ||
// import ChevronRightOutlinedIcon from '@mui/icons-material/ChevronRightOutlined'; // > 아이콘 | ||
|
||
export default function Mypage() { | ||
const [liked, setLiked] = useState<boolean>(false); | ||
const [showProfileModify, setShowProfileModify] = useState<boolean>(false); | ||
|
||
const handleLikeClick = () => { | ||
setLiked(!liked); | ||
const handleSettingsClick = () => { | ||
setShowProfileModify(!showProfileModify); | ||
}; | ||
|
||
return ( | ||
<div className="container"> | ||
{/* header 넣을지 말지 */} | ||
{/* <header>로고 이미지</header> */} | ||
<p className="title">마이페이지</p> | ||
<div className="mypage_body"> | ||
{/* ------------- 프로필 부분 ------------- */} | ||
<div className="user"> | ||
<div className="user_profile"> | ||
<AccountCircleOutlinedIcon className="user_image" /> | ||
<p className="user_name">김똥이</p> | ||
</div> | ||
<div className="user_info"> | ||
<div className="num_box"> | ||
<p className="user_post">내 게시물</p> | ||
<p className="user_post_num">7</p> | ||
<> | ||
<div className="container"> | ||
{/* header 넣을지 말지 */} | ||
{/* <header>로고 이미지</header> */} | ||
<div className="top"> | ||
<h2 className="title">마이페이지</h2> | ||
<SettingsIcon className="setting" onClick={handleSettingsClick} /> | ||
</div> | ||
<div className="mypage_body"> | ||
{/* ------------- 프로필 부분 ------------- */} | ||
<div className="user"> | ||
<div className="user_profile"> | ||
<AccountCircleOutlinedIcon className="user_image" /> | ||
<p className="user_name">김똥이</p> | ||
</div> | ||
<div className="num_box"> | ||
<p className="user_like">좋아요 한 게시물</p> | ||
<p className="user_like_num">10</p> | ||
<div className="user_info"> | ||
<div className="num_box"> | ||
<p className="user_post">내 게시물</p> | ||
<p className="user_post_num">7</p> | ||
</div> | ||
<div className="num_box"> | ||
<p className="user_like">좋아요 한 게시물</p> | ||
<p className="user_like_num">10</p> | ||
</div> | ||
</div> | ||
</div> | ||
{/* --------------------------------------- */} | ||
{/* ------------- tap 부분 ------------- */} | ||
<TabBar /> | ||
</div> | ||
{/* --------------------------------------- */} | ||
{/* ------------- tap 부분 ------------- */} | ||
<div className="tap_bar"> | ||
<GridOnOutlinedIcon className="icon mypost_icon" /> | ||
{liked ? ( | ||
<FavoriteIcon | ||
className="icon pulllike_icon" | ||
onClick={handleLikeClick} | ||
/> | ||
) : ( | ||
<FavoriteBorderOutlinedIcon | ||
className="icon like_icon" | ||
onClick={handleLikeClick} | ||
/> | ||
)} | ||
</div> | ||
{/* --------------------------------------- */} | ||
{/* ------------- post 부분 ------------- */} | ||
<div className="post_box"> | ||
<div className="post">1</div> | ||
<div className="post">2</div> | ||
<div className="post">3</div> | ||
<div className="post">4</div> | ||
<div className="post">5</div> | ||
<div className="post">6</div> | ||
<div className="post">7</div> | ||
<div className="post">8</div> | ||
</div> | ||
<Menubar /> | ||
</div> | ||
<Menubar /> | ||
</div> | ||
{showProfileModify ? <Profile /> : null} | ||
</> | ||
); | ||
} |
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,11 @@ | ||
export default function LikePost() { | ||
return ( | ||
<div className="post_box"> | ||
<div className="post">1</div> | ||
<div className="post">2</div> | ||
<div className="post">3</div> | ||
<div className="post">4</div> | ||
<div className="post">5</div> | ||
</div> | ||
); | ||
} |
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 @@ | ||
export default function MyPost() { | ||
return ( | ||
<div className="post_box"> | ||
<div className="post">1</div> | ||
<div className="post">2</div> | ||
<div className="post">3</div> | ||
<div className="post">4</div> | ||
<div className="post">5</div> | ||
<div className="post">6</div> | ||
<div className="post">7</div> | ||
<div className="post">8</div> | ||
</div> | ||
); | ||
} |
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 Profile() { | ||
return <div className="modal_container">프로필 수정창</div>; | ||
} |
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,57 @@ | ||
import { useState } from "react"; | ||
import GridOnOutlinedIcon from "@mui/icons-material/GridOnOutlined"; | ||
import GridOnTwoToneIcon from "@mui/icons-material/GridOnTwoTone"; | ||
import FavoriteBorderOutlinedIcon from "@mui/icons-material/FavoriteBorderOutlined"; | ||
import FavoriteIcon from "@mui/icons-material/Favorite"; | ||
import LikePost from "./LikePost"; | ||
import MyPost from "./MyPost"; | ||
|
||
export default function TabBar() { | ||
const [grid, setGrid] = useState<boolean>(true); | ||
const [liked, setLiked] = useState<boolean>(false); | ||
|
||
const handleGridClick = () => { | ||
if (!liked && grid) { | ||
setGrid(grid); | ||
} else { | ||
setGrid(true); | ||
setLiked(false); | ||
} | ||
}; | ||
|
||
const handleLikeClick = () => { | ||
if (!grid && liked) { | ||
setLiked(liked); | ||
} else { | ||
setLiked(true); | ||
setGrid(false); | ||
} | ||
}; | ||
|
||
return ( | ||
<> | ||
<div className="tab_bar"> | ||
{grid ? ( | ||
<GridOnTwoToneIcon | ||
className="icon click_icon" | ||
onClick={handleGridClick} | ||
/> | ||
) : ( | ||
<GridOnOutlinedIcon className="icon" onClick={handleGridClick} /> | ||
)} | ||
|
||
{liked ? ( | ||
<FavoriteIcon className="icon click_icon" onClick={handleLikeClick} /> | ||
) : ( | ||
<FavoriteBorderOutlinedIcon | ||
className="icon" | ||
onClick={handleLikeClick} | ||
/> | ||
)} | ||
</div> | ||
{/* post 부분 */} | ||
{grid ? <MyPost /> : null} | ||
{liked ? <LikePost /> : null} | ||
</> | ||
); | ||
} |
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