diff --git a/src/apis/auth/auth.model.ts b/src/apis/auth/auth.model.ts index f6e8306..063d4ec 100644 --- a/src/apis/auth/auth.model.ts +++ b/src/apis/auth/auth.model.ts @@ -10,6 +10,7 @@ export interface LoginResponse { * UserResponse */ export interface UserResponse { + days_since_join: number; email: string; nickname: string; picture: string; diff --git a/src/pages/my/components/MyInfo.tsx b/src/pages/my/components/MyInfo.tsx index b9f4b70..26e191a 100644 --- a/src/pages/my/components/MyInfo.tsx +++ b/src/pages/my/components/MyInfo.tsx @@ -21,7 +21,7 @@ import { getUser } from "@/apis/auth/auth"; const MyInfo = () => { const { userData, setUser, resetUserState } = useUser(); const [nickname, setNickname] = useState(""); - const { isUnderTablet } = useDeviceSize(); + const { isUnderTablet, isMobile } = useDeviceSize(); const showToast = useToast(); const getUserData = () => { @@ -82,7 +82,13 @@ const MyInfo = () => { - + 마이페이지 { backgroundColor: "white", borderRadius: "12px", padding: "20px", - maxWidth: "1083px", + width: "100%", }} + gap={44} + wrap > - + 닉네임 { - {/* - TODO: 가입일, 함께한 날, 가입 순서 정보 구현 - - + + {/* TODO: 가입일, 함께한 날, 가입 순서 정보 구현 */} + + + + 함께한 날 + + + + D+{userData.user?.days_since_join} + + + + - 가입일 + 실행한 프롬프트 - + + 총{" "} + {userData.user?.total_prompt_executions} + 개 + - */} + - + @@ -165,16 +196,14 @@ const Container = styled.div` `; const Wrapper = styled.div<{ $isUnderTablet: boolean }>` + ${({ theme }) => theme.mixins.flexBox("column", "center", "center")}; width: 100%; padding-top: ${({ $isUnderTablet }) => ($isUnderTablet ? 0 : "60px")}; margin: 0 auto; `; const MyInfoWrapper = styled.div` - display: flex; - flex-direction: column; - justify-content: center; - + ${({ theme }) => theme.mixins.flexBox("column", "center", "start")}; background-color: #f0f2f5; padding: 41px 40px; width: 100%; @@ -192,14 +221,15 @@ const Email = styled.div` margin-top: 8px; `; -// const Chip = styled.div` -// display: flex; -// height: 28px; -// padding: 4px 12px 3px 12px; -// justify-content: center; -// align-items: center; -// gap: 10px; -// align-self: stretch; -// border-radius: 6px; -// background: var(--gray-100, #f1f2f6); -// `; +const Chip = styled.div` + display: flex; + height: 28px; + padding: 4px 12px 3px 12px; + justify-content: center; + align-items: center; + gap: 10px; + align-self: stretch; + border-radius: 6px; + background: var(--gray-100, #f1f2f6); + width: fit-content; +`;