Skip to content

Commit

Permalink
Merge pull request #294 from Kernel360/291-fix-fix-point-page-error
Browse files Browse the repository at this point in the history
[fix] 포인트 페이지 에러 수정, 로고 추가 등 자잘한 에러 수정
  • Loading branch information
smosco authored Nov 21, 2024
2 parents 63196aa + ce4ee9f commit 60ae23f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/app/(default)/mypage/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/* eslint-disable jsx-a11y/label-has-associated-control */
import { useState, useEffect, useMemo } from 'react';

import { Camera, X } from 'lucide-react';
// TODO(@godhyzzang) : 나중에 프로필 업로드 기능 추가
// import { Camera, X } from 'lucide-react';

import { useFetchAllCategories } from '@/api/hooks/useCategories';
import { useUserInfo, useUpdateUserInfo } from '@/api/hooks/useUserInfo';
Expand Down Expand Up @@ -132,10 +132,10 @@ export default function UserProfile() {
return (
<div className="bg-white min-h-screen">
<header className="flex items-center p-3 border-b">
<h1 className="flex-1 text-center font-semibold">개인정보수정</h1>
<h1 className="flex-1 text-center font-semibold">개인정보수정</h1>
</header>
<div className="p-4 max-w-xl flex flex-col justify-center items-center mx-auto">
<div className="flex justify-center mb-6">
{/* <div className="flex justify-center mb-6">
<div className="relative">
<img
src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png"
Expand All @@ -155,9 +155,9 @@ export default function UserProfile() {
<X className="w-4 h-4" />
</button>
</div>
</div>
</div> */}

<form className="space-y-4 w-full">
<form className="space-y-4 w-full m-8">
<div>
<label
htmlFor="nickname"
Expand Down
9 changes: 6 additions & 3 deletions src/app/(default)/point/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function PointHistoryItem({ date, pointsHistory }: MonthlyHistory) {
}`}
>
{activity.point >= 0 ? '+' : '-'}
{Math.abs(activity.point)}
{Math.abs(activity.point)}P
</span>
</div>
))}
Expand Down Expand Up @@ -99,10 +99,13 @@ export default function PointHistory() {
];

const [currentMonth, setCurrentMonth] = useState<(typeof months)[number]>(
months[0],
() => {
const currentMonthString = (new Date().getMonth() + 1).toString();
return months.find((month) => month === currentMonthString) || '1';
},
);
const { data: currentPointsData } = useFetchMonthlyPointsHistory(
`2024-${currentMonth}`, // 이게 현재 날짜?
`2024-${currentMonth.length < 2 ? `0${currentMonth}` : currentMonth}`,
);
const currentPoints = currentPointsData?.data.currentPoint;

Expand Down
Binary file removed src/app/favicon.ico
Binary file not shown.
Binary file added src/app/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function Header() {
<>
<div className="sticky top-0 z-50 bg-[rgba(255,255,255,0.95)] border-b">
<header className="flex items-center max-w-[1440px] h-16 mx-auto px-6 z-100">
<Link href="/" className="text-lg font-semibold mr-6">
<Link href="/" className="text-lg font-bold mr-6 text-primary">
Biengual
</Link>
<nav className="hidden md:flex items-center">
Expand Down

0 comments on commit 60ae23f

Please sign in to comment.