Skip to content

Commit fd61506

Browse files
RbaamjwParkDevhasuhwanhasuhwanMenat91
authored
refactor - #138: MyPage 리팩터링 완료 (#156)
* docs - #1: README 파일 일부 수정 * chore - #4: Tailwind CSS 설치 및 기본 세팅 * feat - #4: Modal UI 구현 * rename - #36: 라우팅 구조 수립 (#37) * feat - #8: BottomNavBar, DropDown, AuthArticle, ReviewArticle UI 구현 (#45) * Iss8 작업 중 (#1) * navigation bar * chore - #4: Tailwind CSS 설치 및 기본 세팅 * feat - #4: Modal UI 구현 * nav 디자인 수정 중 * ing Co-authored-by: hasuhwan <[email protected]> Co-authored-by: jwParkDev <[email protected]> * ing * feat - #8: BottomNavBar, DropDown, AuthArticle, ReviewArticle UI 구현 * feat - #8: BottomNavBar, DropDown, AuthArticle, ReviewArticle UI 구현 * feat - #8: BottomNavBar, DropDown, AuthArticle, ReviewArticle UI 구현 * feat - #8: BottomNavBar, DropDown, AuthArticle, ReviewArticle UI 구현 Co-authored-by: hasuhwan <[email protected]> Co-authored-by: jwParkDev <[email protected]> * feat - #4: Habit Element, WrapperHorizontal UI 구현 * feat - #4: HabitElement, HabbitWrapper, FileUploader, SlideBanner UI 구현 * feat - #9: footer, button, wantedhabit ui 구현 * docs: Update issue templates * feat - #49: signUp UI 구현 * feat - #1: Login UI 구현 완료, CSS 조정 필요 * feat - #1: Login Page UI 구현 완료 * fix - #62: 리베이스 머지 충돌 확인 * feat - #64: Home Page UI 구현 (#72) * docs: Update issue templates * feat - #1: Login UI 구현 완료, CSS 조정 필요 * feat - #64: Home Page UI 구현 * feat - #67: Edit Userinfo Page UI 구현, Auth Page UI 구현 * feat - #65: Habit Post UI 구현 1차 (#74) * docs: Update issue templates * feat - #1: Login UI 구현 완료, CSS 조정 필요 * feat - #64: Home Page UI 구현 * feat - #65: Habit Post UI 구현 1차 * feat - #65: Habit Post UI 구현 1차 * feat - #75: API 비동기 호출 함수 작성 중 * rename - #75: 회원가입 페이지 파일명 변경 * feat - #65: Habit Post Page UI 구현 (#80) * docs: Update issue templates * feat - #1: Login UI 구현 완료, CSS 조정 필요 * feat - #64: Home Page UI 구현 * feat - #65: Habit Post UI 구현 1차 * feat - #65: Habit Post UI 구현 1차 * feat - #65: Habit Post Page UI 구현 * feat: RTK를 활용하여 전역 상태 관리 로직 구현 (1차) (#84) * docs: Update issue templates * feat - #1: Login UI 구현 완료, CSS 조정 필요 * feat - #64: Home Page UI 구현 * feat - #65: Habit Post UI 구현 1차 * feat - #65: Habit Post UI 구현 1차 * feat - #65: Habit Post Page UI 구현 * feat - #81: feat: RTK를 활용하여 전역 상태 관리 로직 구현(1차) * docs: Update issue templates (#85) Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * feat - #7: Header 컴포넌트 구현 (#83) * docs: Update issue templates * feat #7: Haeder 컴포넌트 완료 * feat #7: Haeder 컴포넌트 완료 * feat - #7: Haeder 컴포넌트 완료, 주석 수정 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * feat - #86: PWA 기본 환경 세팅 (#87) * feat - #65: Habit Post Page UI 구현 * feat - #81: feat: RTK를 활용하여 전역 상태 관리 로직 구현(1차) * feat - #86: PWA 기본 환경 세팅 * feat - #88: 내가 만든 습관 페이지 구현 * feat - #92: Infinite Scroll 구현 (custom hook) (#95) * docs: Update issue templates * feat - #92: Loading Indicator UI 구현 * feat - #92: Infinite Scroll 구현 (custom hook) * feat - #7: Header 컴포넌트 최종수정 (#98) * docs: Update issue templates * feat #7: Haeder 컴포넌트 완료 * feat #7: Haeder 컴포넌트 완료 * feat - #7: Haeder 컴포넌트 완료, 주석 수정 * feat - #86: PWA 기본 환경 세팅 (#87) * feat - #65: Habit Post Page UI 구현 * feat - #81: feat: RTK를 활용하여 전역 상태 관리 로직 구현(1차) * feat - #86: PWA 기본 환경 세팅 * feat - #88: 내가 만든 습관 페이지 구현 * feat - #92: Infinite Scroll 구현 (custom hook) (#95) * docs: Update issue templates * feat - #92: Loading Indicator UI 구현 * feat - #92: Infinite Scroll 구현 (custom hook) * feat - #7: Header 로고크기 변경, 폰트 변경 최종수정안 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> Co-authored-by: hasuhwan <[email protected]> * feat - #97 Habit Search Page UI 구현 * feat - #97: 바텀 내비게이션 수정 및 검색 페이지 UI 구현 (#102) * docs: Update issue templates * feat - #97 Habit Search Page UI 구현 * feat - #97: 바텀 내비게이션 수정 및 검색 페이지 UI 구현 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * feat - #66: Habit Detail UI 구현 2차, Next/Layout 도입 외 코드 수정 다수 (#112) * docs: Update issue templates * fix - #66: Home UI 일부 수정 * feat - #66: Habit Detail Page UI 구현 1차 * feat - #103: 현재 api 명세 기반 비동기 함수 작성 및 top scroll 버튼 작성 (#113) * docs: Update issue templates * feat - #103: 모듈 함수 수정 중 * feat - #103: 모듈 함수 수정 중 * feat - #103: 현재 api 명세 기반 비동기 함수 작성 및 top scroll 버튼 작성 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * fix - #66: Habit Detail 포함 일부 코드 수정 (#115) * docs: Update issue templates * fix - #66: Home UI 일부 수정 * feat - #66: Habit Detail Page UI 구현 1차 * fix - #7: 헤더 크기 수정 * feat - #99: 마이페이지 프로그레스바 제외 구현 (#118) * docs: Update issue templates * fix - #7: 헤더 크기 수정 * feat - #99: 마이페이지 프로그레스바 제외 구현 Co-authored-by: jwParkDev <[email protected]> * [FE] Feat - #50 myPageMenu 구현 및 button css 수정, footer 마크업 수정 (#125) * docs: Update issue templates * feat - #50 버튼 css 편집, footer ui 수정 * feat - #50: certificationModal 목업 제작 * rename - 찜한 습관 컴포넌트화 * design - 인증서발급 div 목업 * comment - 버튼이름 주석 변경 * style - #50: footer 색상 변경 * rename - #50: 파일 이름 변경 * feat - 인증서 발급 항목 모달창 기능구현 * comment - 충돌 해결을 위한 단순 저장 (엔터키 한번침) * rename - 충돌 해결 위한 커밋 Co-authored-by: jwParkDev <[email protected]> * rename - 파일 이름 변경 * feat - #117: Slide Banner 추가 구현 완료 (#128) * docs: Update issue templates * ing * Delete sw.js.map * feat - #117: slide banner 추가 구현 (#130) * docs: Update issue templates * feat - #117: slide banner 추가 구현 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * feat - #117: Process Gauage Bar 구현 (#131) * docs: Update issue templates * ing * Delete sw.js.map * [FE] Feat - #50 myPageMenu 구현 및 button css 수정, footer 마크업 수정 (#125) * docs: Update issue templates * feat - #50 버튼 css 편집, footer ui 수정 * feat - #50: certificationModal 목업 제작 * rename - 찜한 습관 컴포넌트화 * design - 인증서발급 div 목업 * comment - 버튼이름 주석 변경 * style - #50: footer 색상 변경 * rename - #50: 파일 이름 변경 * feat - 인증서 발급 항목 모달창 기능구현 * comment - 충돌 해결을 위한 단순 저장 (엔터키 한번침) * rename - 충돌 해결 위한 커밋 Co-authored-by: jwParkDev <[email protected]> * rename - 파일 이름 변경 * feat - #117: slide banner 추가 구현 (#130) * docs: Update issue templates * feat - #117: slide banner 추가 구현 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * feat - #117: Process Gauage Bar 구현 Co-authored-by: Menat91 <[email protected]> Co-authored-by: Menat91 <[email protected]> Co-authored-by: hasuhwan <[email protected]> Co-authored-by: hasuhwan <[email protected]> * fix - #117: TS 리펙토링 시작전 * docs: Update issue templates (#132) * refactor - #139: signup edit 타입스크립트 리팩토링 * refactor - #141: 리덕스 관련 파일 리팩토링 * refactor - #65: Login, Custom Hook, 몇몇 Component Typescript Refactoring (#144) * docs: Update issue templates * refactor - #65: Login, Custom Hook, 몇몇 Component Typescript Refactoring * docs: Update issue templates (#145) * chore - #138: 타인 작업분 pull 이전, 임시 스테이징 * refactor - #143: 리덕스 코드 리팩토링 (#149) * docs: Update issue templates * 병합 * refactor - #143 코드 리팩토링 중 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * docs: Update issue templates (#151) * refactor - #150: 바텀 네비게이션 및 드롭다운 리팩토링 (#154) * docs: Update issue templates * 병합 * refactor - #150: 바텀 네비게이션 및 드롭다운 리팩토링 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> * refactor - #138: MyPage 리팩터링 완료 Co-authored-by: jwParkDev <[email protected]> Co-authored-by: hasuhwan <[email protected]> Co-authored-by: hasuhwan <[email protected]> Co-authored-by: Menat91 <[email protected]> Co-authored-by: Menat91 <[email protected]>
1 parent ff014b3 commit fd61506

File tree

125 files changed

+18441
-2926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+18441
-2926
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
## Contributors
44

5-
- FE: 박정우, 김동규, 배성진, 하수환
6-
- BE: 강영은, 선우예림, 김찬빈
5+
- FE: 박정우, 김동규, 배성진, 하수환(멋쟁이)
6+
- BE: 강영은, 선우예림, 김찬빈

client/.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_SERVER_URL=http://13.209.179.193:8080

client/.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,18 @@ yarn-error.log*
2626
.pnpm-debug.log*
2727

2828
# local env files
29-
.env*.local
29+
.env
30+
.env.development.local
31+
.env.test.local
32+
.env.production.local
33+
.env.local
3034

3135
# vercel
3236
.vercel
3337

3438
# typescript
3539
*.tsbuildinfo
3640
next-env.d.ts
41+
42+
# sw.js.map
43+
/public/sw.js.map

client/components/authArticle.tsx

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { DropDown } from './dropDown';
2+
import { useEffect, useState } from 'react';
3+
import Image from 'next/image';
4+
import { useAppSelector } from '../ducks/store';
5+
6+
export function AuthArticle() {
7+
const { userId } = useAppSelector((state) => state.loginIdentity);
8+
9+
//필요 데이터 유저네임,score,후기내용,리뷰등록시간, 등록한 유저Id
10+
//등록한 유저 Id와 현재 로그인한 유저 Id가 같다면 editUserBoolean을 true로 만들어 줄 것.
11+
const [editUserBoolean, setEditUserBoolean] = useState(false);
12+
useEffect(() => {}, []);
13+
return (
14+
<div className="flex justify-center w-full h-auto py-5 box-border gap-5">
15+
<div className="flex flex-col relative items-center w-full">
16+
<div className="auth-article-header w-full flex justify-between items-center mb-2 ">
17+
<div className="flex w-full gap-2.5 items-center">
18+
<span className="text-base">{`userName`}</span>
19+
<span className="text-sm text-[#7d7d7d]">{`postTime`}</span>
20+
</div>
21+
<DropDown dropDownType="auth" boolean={editUserBoolean} />
22+
</div>
23+
<div className="w-full border-solid mb-2">
24+
<Image
25+
className="w-full h-full rounded-md"
26+
src={`https://media.istockphoto.com/id/1036780592/ko/%EC%82%AC%EC%A7%84/%EC%8B%A4%ED%96%89%EC%9D%80-%EB%A7%9E%EB%8A%94-%EC%88%99%EB%B0%95-%ED%95%98%EB%8A%94-%EA%B0%80%EC%9E%A5-%EC%A2%8B%EC%9D%80-%EB%B0%A9%EB%B2%95-%EC%A4%91-%ED%95%98%EB%82%98%EC%9E%85%EB%8B%88%EB%8B%A4.jpg?s=612x612&w=0&k=20&c=bwDHMjgN3nAuS4sM5JpEY2H8nkRK7rlrKkO8z-Txs9o=`}
27+
alt="auth image"
28+
width={500}
29+
height={500}
30+
/>
31+
</div>
32+
<div className=" w-full h-1/4 box-border flex flex-wrap p-px">
33+
<span className="text-base break-all w-full">
34+
{`오늘도 열심히 달려버렸다`}
35+
</span>
36+
</div>
37+
</div>
38+
</div>
39+
);
40+
}
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { MainBottomNav } from './mainBottomNav';
2+
import { HabitPageBottomNav } from './habitPageBottomNav';
3+
import { useRouter } from 'next/router';
4+
5+
export function BottomNav() {
6+
//라우팅 된 페이지 경로에 따른 조건 부 렌더링 작성해야함.
7+
const router = useRouter();
8+
const pathname: string = router.asPath;
9+
//경로 조건에 따른 nav bar 다르게 해야함. 페이지 작성 다되고나면 분할 예정
10+
// 로그인 페이지 회원가입 페이지는 nav bar 존재하지 않는다.
11+
const paramArr: string[] = pathname.split('/');
12+
let param: string = '';
13+
if (pathname.includes('detail')) {
14+
param = 'detail';
15+
} else if (pathname.includes('signup')) {
16+
param = 'signup';
17+
} else if (pathname.includes('search')) {
18+
param = 'search';
19+
} else if (pathname.includes('auth')) {
20+
param = 'auth';
21+
} else if (pathname.includes('post' || 'edit')) {
22+
param = 'post';
23+
} else if (pathname.includes('mypage')) {
24+
param = 'mypage';
25+
} else if (paramArr[1] === '' || pathname.includes('home')) {
26+
param = 'home';
27+
}
28+
if (
29+
param === 'home' ||
30+
param === 'search' ||
31+
param === 'auth' ||
32+
param === 'post' ||
33+
param === 'mypage'
34+
) {
35+
return <MainBottomNav param={param} />;
36+
} else if (param === 'detail') {
37+
return <HabitPageBottomNav />;
38+
} else {
39+
return;
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { useState } from 'react';
2+
import { useRouter } from 'next/router';
3+
4+
export function EditHabitBottomNav() {
5+
//게시글 클릭 유저의 상황에 따른 달라지는 네비게이션 현재는 임의로 조정
6+
//useState 초기 값은 getServerSideProps로 받아와 부여 할 생각 중 해봐야 알듯.
7+
const router = useRouter();
8+
const startHabitHandle = (): void => {
9+
//습관 시작 모달 호출 핸들
10+
//이미 진행 중인 유저는 하는 중이다 알려주는 모달 창 띄우기
11+
};
12+
const editHabitHandle = (): void => {
13+
//수정 페이지 이동해야함. 프롭스로 전달 예정 프롭스가 있을 경우 수정 페이지
14+
};
15+
return (
16+
<div className="flex bg-white h-[3rem] px-6 w-full fixed bottom-0 min-w[300px] justify-center items-center border-t">
17+
<button
18+
className="bg-mainColor h-3/4 w-1/2 rounded-lg mr-2.5 text-iconColor text-base"
19+
onClick={editHabitHandle}
20+
>
21+
Edit
22+
</button>
23+
<button
24+
className="bg-mainColor h-3/4 w-1/2 rounded-lg ml-2.5 text-iconColor text-base"
25+
onClick={startHabitHandle}
26+
>
27+
Start
28+
</button>
29+
</div>
30+
);
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { useEffect, useState } from 'react';
2+
import { StartHabitBottomNav } from './startHabitBottomNav';
3+
import { EditHabitBottomNav } from './editHabitBottomNav';
4+
import { ReviewHabitBottomNav } from './reviewHabitBottomNav';
5+
import { useRouter } from 'next/router';
6+
import { getHabitDetail } from '../../module/habitFunctionMoudules';
7+
import { useAppSelector } from '../../ducks/store';
8+
interface IhabitDetail {
9+
authEndTime: string;
10+
authStartTime: string;
11+
authType: string;
12+
body: string;
13+
category: string;
14+
habitId: number;
15+
isBooked: boolean;
16+
score: number;
17+
subTitle: string;
18+
title: string;
19+
userId: number;
20+
}
21+
export function HabitPageBottomNav() {
22+
//user가 접근한 습관에 대해 시작 여부에 따른 분배
23+
const router = useRouter();
24+
const { userId } = useAppSelector((state) => state.loginIdentity);
25+
const habitId: string | string[] = router.query.habitId;
26+
const a = 1;
27+
28+
if (a === 1) {
29+
return <StartHabitBottomNav />;
30+
} else if (a === 2) {
31+
return <EditHabitBottomNav />;
32+
} else {
33+
return <ReviewHabitBottomNav />;
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
import { useEffect, useState } from 'react';
2+
import {
3+
AiOutlineHome,
4+
AiOutlineSearch,
5+
AiOutlineCamera,
6+
AiOutlineUser,
7+
AiOutlineLogin,
8+
} from 'react-icons/ai';
9+
import { IoIosAddCircleOutline } from 'react-icons/io';
10+
import { useRouter } from 'next/router';
11+
import { useAppSelector } from '../../ducks/store';
12+
13+
interface ImenusValue {
14+
name: string;
15+
icon: JSX.Element;
16+
dis: string;
17+
link: string;
18+
}
19+
20+
export function MainBottomNav({ param }) {
21+
const [active, setActive] = useState(0);
22+
const [menus, setMenus] = useState<ImenusValue[]>([]);
23+
const router = useRouter();
24+
const { isLogin } = useAppSelector((state) => state.loginIdentity);
25+
useEffect(() => {
26+
let currentActive: number;
27+
if (param === 'home') {
28+
currentActive = 0;
29+
} else if (param === 'search') {
30+
currentActive = 1;
31+
} else if (param === 'auth') {
32+
currentActive = 2;
33+
} else if (param === 'post') {
34+
currentActive = 3;
35+
} else if (param === 'mypage') {
36+
currentActive = 4;
37+
}
38+
setActive(currentActive);
39+
}, [param]);
40+
useEffect(() => {
41+
let menuArr = [
42+
{
43+
name: 'Home',
44+
icon: <AiOutlineHome />,
45+
dis: 'translate-x-0',
46+
link: '/',
47+
},
48+
{
49+
name: 'Search',
50+
icon: <AiOutlineSearch />,
51+
dis: 'translate-x-14',
52+
link: '/habit/search',
53+
},
54+
{
55+
name: 'Auth',
56+
icon: <AiOutlineCamera />,
57+
dis: 'translate-x-28',
58+
link: '/auth',
59+
},
60+
{
61+
name: 'Post',
62+
icon: <IoIosAddCircleOutline />,
63+
dis: 'translate-x-42',
64+
link: '/habit/post',
65+
},
66+
];
67+
if (isLogin === true) {
68+
setMenus([
69+
...menuArr,
70+
{
71+
name: 'MyPage',
72+
icon: <AiOutlineUser />,
73+
dis: 'translate-x-56',
74+
link: '/user/mypage',
75+
},
76+
]);
77+
} else {
78+
setMenus([
79+
...menuArr,
80+
{
81+
name: 'login',
82+
icon: <AiOutlineLogin />,
83+
dis: 'translate-x-56',
84+
link: '/user/login',
85+
},
86+
]);
87+
}
88+
}, [isLogin]);
89+
const onClickHandle = (link: string) => {
90+
//버튼 별 페이지 경로 작성 해야함.
91+
92+
const linkBoolean: boolean = menus.slice(2).some((el) => {
93+
return el.link.includes(link);
94+
});
95+
if (isLogin === false && linkBoolean === true && link !== '/') {
96+
router.push('/user/login');
97+
} else {
98+
router.push(link);
99+
}
100+
};
101+
return (
102+
<div className="flex bg-mainColor h-[50px] px-6 w-full fixed bottom-0 min-w[300px] justify-center">
103+
<ul className="flex relative items-center justify-center">
104+
<span
105+
className={`bg-subColor duration-500 ${menus[active]?.dis} border-4 border-white h-14 w-14 absolute -top-7 -left-0 rounded-full `}
106+
></span>
107+
{menus.map((menu, i) => {
108+
return (
109+
<li key={i} className="w-14">
110+
<div
111+
className="flex flex-col text-center pt-6"
112+
onClick={() => setActive(i)}
113+
>
114+
<span
115+
className={`flex justify-center text-xl text-iconColor cursor-pointer duration-500 z-50 ${
116+
i === active && '-mt-11 text-iconColor '
117+
}`}
118+
onClick={() => onClickHandle(menu.link)}
119+
>
120+
{menu.icon}
121+
</span>
122+
<span
123+
className={` ${
124+
active === i
125+
? 'translate-y-4 duration-700 opacity-100 text-sm text-iconColor text-base'
126+
: 'opacity-0 translate-y-10 text-iconColor text-sm text-base'
127+
}`}
128+
>
129+
{menu.name}
130+
</span>
131+
</div>
132+
</li>
133+
);
134+
})}
135+
</ul>
136+
</div>
137+
);
138+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { useState } from 'react';
2+
3+
export function ReviewHabitBottomNav() {
4+
//게시글 클릭 유저의 상황에 따른 달라지는 네비게이션 현재는 임의로 조정
5+
//useState 초기 값은 getServerSideProps로 받아와 부여 할 생각 중 해봐야 알듯.
6+
7+
const reviewHabitHandle = () => {
8+
//리뷰 모달창 꺼내야 한다.
9+
};
10+
return (
11+
<div className="flex bg-white h-[3rem] px-6 w-full fixed bottom-0 min-w[300px] justify-center items-center border-t">
12+
<button
13+
className="bg-mainColor h-3/4 w-full rounded-lg text-iconColor text-base"
14+
onClick={reviewHabitHandle}
15+
>
16+
write Review
17+
</button>
18+
</div>
19+
);
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { useState } from 'react';
2+
import { AiOutlineHeart, AiFillHeart } from 'react-icons/ai';
3+
4+
interface IBookMarkValue {
5+
boolean: boolean;
6+
animate: string;
7+
}
8+
9+
export function StartHabitBottomNav() {
10+
const [isBookMark, setIsBookMark] = useState<IBookMarkValue>({
11+
boolean: false,
12+
animate: 'h-3/4 w-1/4 text-subColor ',
13+
});
14+
const bookMarkHandle = (): void => {
15+
//login 여부 확인 후 false면 로그인 페이지로 경로 설정
16+
//북마크 관련 비동기 요청 함수
17+
if (isBookMark.boolean === false) {
18+
setIsBookMark({
19+
boolean: true,
20+
animate: isBookMark.animate + 'animate-bookMark',
21+
});
22+
} else {
23+
setIsBookMark({ boolean: false, animate: 'animate-bookMark' });
24+
}
25+
};
26+
const startHabitHandle = () => {
27+
//습관 시작 모달 호출 핸들
28+
//이미 진행 중인 유저는 하는 중이다 알려주는 모달 창 띄우기
29+
};
30+
31+
return (
32+
<div className="flex bg-white h-[3rem] px-6 w-full fixed bottom-0 border-t min-w[300px] justify-center items-center">
33+
{isBookMark.boolean === false ? (
34+
<AiOutlineHeart
35+
className="h-3/4 w-1/4 text-subColor"
36+
onClick={bookMarkHandle}
37+
/>
38+
) : (
39+
<AiFillHeart className={isBookMark.animate} onClick={bookMarkHandle} />
40+
)}
41+
42+
<button
43+
className="bg-mainColor h-4/5 w-3/4 rounded-lg ml-5 text-iconColor text-base"
44+
onClick={startHabitHandle}
45+
>
46+
Start
47+
</button>
48+
</div>
49+
);
50+
}

0 commit comments

Comments
 (0)