-
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.
* New : 술 태그 클릭시 해당 술정보로 이동 * Refactor : userInfo 카드 스켈레톤 추가 * New : 유저정보 페이지 URL 추가 * New : 로그아웃 (쿠키삭제) BFF URL추가 * New : 술 태그 클릭시 해당 술정보로 이동 * Minor : Wrapper 컴포넌트 추가 * New : 로그아웃 (쿠키삭제) route 추가 * New : 술 디테일 페이지 임시추가 * New : 프로필수정 모달 컨텍스트 추가 * Minor : App bar Sementic tag 추가 * Minor : 서버 응답 인터페이스 변경 * New : 프로필 세팅페이지 퍼블리싱
- Loading branch information
1 parent
7ea46c0
commit 0288571
Showing
17 changed files
with
293 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use client"; | ||
import CustomAppbar from "@/components/CustomAppbar"; | ||
import { Container, Stack } from "@mui/material"; | ||
import { ReactNode } from "react"; | ||
|
||
type Props = { | ||
children: ReactNode; | ||
}; | ||
|
||
const UserInfoPageLayout = ({ children }: Props) => { | ||
return ( | ||
<> | ||
<CustomAppbar title="설정" /> | ||
<Container sx={{ px: { xs: 0, sm: 4 } }} maxWidth={"lg"}> | ||
<Stack gap={2}>{children}</Stack> | ||
</Container> | ||
</> | ||
); | ||
}; | ||
|
||
export default UserInfoPageLayout; |
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,100 @@ | ||
"use client"; | ||
|
||
import UserInfoCard from "@/components/user/info/UserInfoCard"; | ||
import UserInfoCardSkeleton from "@/components/user/info/UserInfoCardSkeleton"; | ||
import { useMyInfoQuery } from "@/queries/auth/useMyInfoQuery"; | ||
import { | ||
Button, | ||
ButtonBase, | ||
Paper, | ||
Stack, | ||
Typography, | ||
styled, | ||
} from "@mui/material"; | ||
import PostSeeMoreIcon from "@/assets/icons/PostSeeMoreIcon.svg"; | ||
import { axiosBff } from "@/libs/axios"; | ||
import { LOGOUT_BFF } from "@/const/serverPath"; | ||
|
||
const SettingPage = () => { | ||
const { data: myInfo } = useMyInfoQuery(); | ||
|
||
return ( | ||
<> | ||
<PaddingPaper> | ||
{myInfo ? ( | ||
<UserInfoCard userId={myInfo.userNo} /> | ||
) : ( | ||
<UserInfoCardSkeleton /> | ||
)} | ||
</PaddingPaper> | ||
|
||
<PaddingPaper> | ||
<Typography variant="subtitle2">정보</Typography> | ||
<ButtonBase sx={{ px: 3, py: 1.5, width: "100%" }}> | ||
<RowStack> | ||
<Typography>개인정보</Typography> | ||
<PostSeeMoreIcon /> | ||
</RowStack> | ||
</ButtonBase> | ||
</PaddingPaper> | ||
<PaddingPaper> | ||
<Typography variant="subtitle2">고객센터</Typography> | ||
<ButtonBase sx={{ px: 3, py: 1.5, width: "100%" }}> | ||
<RowStack> | ||
<Typography>고객센터</Typography> | ||
<PostSeeMoreIcon /> | ||
</RowStack> | ||
</ButtonBase> | ||
<ButtonBase sx={{ px: 3, py: 1.5, width: "100%" }}> | ||
<RowStack> | ||
<Typography>Q&A</Typography> | ||
<PostSeeMoreIcon /> | ||
</RowStack> | ||
</ButtonBase> | ||
<ButtonBase sx={{ px: 3, py: 1.5, width: "100%" }}> | ||
<RowStack> | ||
<Typography>사용자 의견 남기기</Typography> | ||
<PostSeeMoreIcon /> | ||
</RowStack> | ||
</ButtonBase> | ||
</PaddingPaper> | ||
<PaddingPaper> | ||
<Typography variant="subtitle2">투파이아</Typography> | ||
<RowStack> | ||
<Typography>버전</Typography> | ||
<Typography>1.0.0</Typography> | ||
</RowStack> | ||
</PaddingPaper> | ||
<PaddingPaper> | ||
<Typography variant="subtitle2">계정</Typography> | ||
<Button | ||
color="secondary" | ||
onClick={() => { | ||
// FIXME 추후 수정해야하는 로그아웃로직 | ||
localStorage.removeItem("accessToken"); | ||
axiosBff.post(LOGOUT_BFF).then((res) => { | ||
location.reload() | ||
}); | ||
}} | ||
> | ||
로그아웃 | ||
</Button> | ||
</PaddingPaper> | ||
</> | ||
); | ||
}; | ||
const PaddingPaper = styled(Paper)(() => ({ | ||
padding: 16, | ||
display: "flex", | ||
flexDirection: "column", | ||
gap: "16px", | ||
})); | ||
|
||
const RowStack = styled(Stack)(() => ({ | ||
width: "100%", | ||
flexDirection: "row", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
})); | ||
|
||
export default SettingPage; |
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,17 @@ | ||
import { cookies } from "next/headers"; | ||
import { NextRequest, NextResponse } from "next/server"; | ||
|
||
export async function POST(request: NextRequest) { | ||
cookies().delete("accessToken"); | ||
return NextResponse.json( | ||
{ message:'success'}, | ||
{ | ||
headers: { | ||
"Access-Control-Allow-Origin": "*", | ||
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS", | ||
"Access-Control-Allow-Headers": "Content-Type, Authorization", | ||
"Access-Control-Allow-Credentials": "true", | ||
}, | ||
} | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
|
||
type Props = {} | ||
|
||
const AlcoholDetailPage = (props: Props) => { | ||
return ( | ||
<div>AlcoholDetailPage</div> | ||
) | ||
} | ||
|
||
export default AlcoholDetailPage |
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
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
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
Oops, something went wrong.