-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix : QA 내용 반영하여 수정 #26
Changes from all commits
9aa1a30
0d9bb87
289a659
341f53e
cd9bae4
34c9da6
dc724f3
e169b2f
25f1592
68c4d46
3707b8f
fabcf8e
8bec5ac
e289d75
c3fb778
87f7464
c3c4efe
7321cfd
6428268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,2 @@ | ||
addReviewers: true | ||
addAssignees: true | ||
reviewers: | ||
- guesung | ||
- seondal | ||
skipKeywords: | ||
- wip | ||
numberOfReviewers: 0 | ||
addReviewers: false | ||
addAssignees: author |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,67 @@ | ||
'use client'; | ||
import Image from 'next/image'; | ||
import { useState } from 'react'; | ||
import { useEffect, useState } from 'react'; | ||
import { Tooltip } from 'react-tooltip'; | ||
|
||
import { Spacing } from '@/components/Spacing'; | ||
|
||
export default function TitleSection() { | ||
const [tooltipOpened, setTooltipOpened] = useState<boolean>(false); | ||
console.log(tooltipOpened); | ||
const [isOpen, setIsOpen] = useState<boolean>(true); | ||
useEffect(() => { | ||
if (localStorage.getItem('tooltipIsOpen') === 'false') setIsOpen(false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 전역 상태가 아닌 로컬 스토리지를 사용하신 이유가 있을까요 ?! |
||
}, []); | ||
|
||
return ( | ||
<section className="flex flex-col items-center"> | ||
<div className="flex items-center"> | ||
<h3 className="text-main-violet">뽑은 제시어</h3> | ||
<a | ||
data-tooltip-id="my-tooltip" | ||
data-tooltip-content={`제시어에 맞춰 포즈를 취해 보세요!\n독특한 나만의 포즈가 완성된답니다.`} | ||
data-tooltip-place="top" | ||
onMouseEnter={() => setTooltipOpened(true)} | ||
style={{ cursor: 'pointer' }} | ||
onClick={() => { | ||
if (isOpen) { | ||
localStorage.setItem('tooltipIsOpen', 'false'); | ||
setIsOpen(false); | ||
} else { | ||
localStorage.setItem('tooltipIsOpen', 'true'); | ||
setIsOpen(true); | ||
} | ||
}} | ||
> | ||
<Image src="/icons/info.svg" width={24} height={24} alt="info" /> | ||
</a> | ||
</div> | ||
<Tooltip id="my-tooltip" style={{ fontSize: '1rem', fontWeight: 400 }} /> | ||
<Tooltip | ||
id="my-tooltip" | ||
style={{ fontSize: '1rem', fontWeight: 400 }} | ||
closeOnEsc | ||
openOnClick | ||
isOpen={isOpen} | ||
render={() => ( | ||
<div | ||
className="flex cursor-pointer" | ||
onClick={() => { | ||
localStorage.setItem('tooltipIsOpen', 'false'); | ||
setIsOpen(false); | ||
}} | ||
> | ||
<div> | ||
<p>제시어에 맞춰 포즈를 취해 보세요!</p> | ||
<p>독특한 나만의 포즈가 완성된답니다.</p> | ||
</div> | ||
<Spacing size={8} direction="horizontal" /> | ||
<Image | ||
src="/icons/close_white.svg" | ||
width={20} | ||
height={20} | ||
alt="close" | ||
className="mb-auto" | ||
/> | ||
</div> | ||
)} | ||
clickable | ||
/> | ||
<Spacing size={8} /> | ||
</section> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Image from 'next/image'; | ||
|
||
import { Header } from '@/components/Header'; | ||
import { Spacing } from '@/components/Spacing'; | ||
|
||
export default function BookmarkHeader() { | ||
const LeftNode = ( | ||
<div className="flex"> | ||
<Image src="/icons/arrow_back.svg" width={24} height={24} alt="back" /> | ||
<Spacing size={12} direction="horizontal" /> | ||
<h4>북마크</h4> | ||
</div> | ||
); | ||
const RightNode = <Image src="/icons/menu.svg" width={24} height={24} alt="back" />; | ||
|
||
return <Header leftNode={LeftNode} rightNode={RightNode} />; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) | |
<html lang="ko"> | ||
<body className="flex min-h-[100vh] w-screen touch-none justify-center bg-slate-100 py-px"> | ||
<RecoilContextProvider> | ||
<div className="w-full max-w-440 bg-white text-primary drop-shadow-2xl"> | ||
<div className="w-full max-w-440 bg-white text-primary"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shadow가 있는게 입체적인 느낌(?) 도 들고 좋은데.... 문제가 된 drop-shadow 말고 그림자 효과 줄 수 있으면 좋을 것 같네요 ㅠ_ㅠ 별개로 이슈 말씀만 드렸는데 생각지도 못한 부분이 원인이라는걸 발견해주신 규성님 통찰력... 짱....! 👍🏻🙌 |
||
<QueryProvider> | ||
<OverlayProvider>{children}</OverlayProvider> | ||
</QueryProvider> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { StrictPropsWithChildren } from '@/types'; | ||
'use client'; | ||
import { type HTMLMotionProps, motion } from 'framer-motion'; | ||
|
||
import type { ButtonHTMLAttributes } from 'react'; | ||
import type { StrictPropsWithChildren } from '@/types'; | ||
|
||
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
export interface ButtonProps extends HTMLMotionProps<'button'> { | ||
className?: string; | ||
type?: 'button' | 'submit'; | ||
} | ||
|
@@ -14,12 +15,14 @@ export default function Button({ | |
...props | ||
}: StrictPropsWithChildren<ButtonProps>) { | ||
return ( | ||
<button | ||
<motion.button | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. motion.button 은 처음 보는 것 같은데 .. 배워갑니다아..! |
||
whileHover={{ scale: 1.05 }} | ||
whileTap={{ scale: 0.9 }} | ||
className={`flex h-60 w-full items-center justify-center rounded-xl py-14 text-center text-16 ${className}`} | ||
type={type} | ||
{...props} | ||
> | ||
<h5>{children}</h5> | ||
</button> | ||
</motion.button> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ export default function Header({ | |
...props | ||
}: HeaderProps) { | ||
return ( | ||
<div className="fixed inset-x-0 top-0 z-10 bg-white pt-8"> | ||
<div className="fixed inset-x-0 top-0 z-10 mx-auto max-w-440 bg-white pt-8"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed inset-x-0 인데 max-w 를 넣은 이유가 있을까요 ?! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed는 브라우저 전체 사이즈를 기준으로 위치를 잡기에 너비 지정이 필요합니다. |
||
<header | ||
className={`flex h-48 items-center justify-between ${className ? className : ''}`} | ||
{...props} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,42 @@ | ||
import { useCallback, useState } from 'react'; | ||
import { useCallback, useEffect, useState } from 'react'; | ||
|
||
import useIsMounted from './useIsMounted'; | ||
|
||
interface UseLoadingProps { | ||
initialState?: boolean; | ||
loadingDelay?: number; | ||
onStopLoading?: () => void; | ||
isFirstLoadingInfinite?: boolean; | ||
} | ||
export default function useLoading({ | ||
initialState = true, | ||
loadingDelay, | ||
onStopLoading, | ||
isFirstLoadingInfinite = false, | ||
}: UseLoadingProps = {}) { | ||
const [isLoading, setIsLoading] = useState(initialState ?? false); | ||
const [isLoading, setIsLoading] = useState(initialState); | ||
const isMounted = useIsMounted(); | ||
|
||
const stopLoading = useCallback(() => { | ||
setIsLoading(false); | ||
}, []); | ||
if (onStopLoading) { | ||
onStopLoading(); | ||
} | ||
}, [onStopLoading]); | ||
|
||
const startLoading = useCallback(() => { | ||
setIsLoading(true); | ||
setTimeout(() => { | ||
stopLoading(); | ||
}, loadingDelay); | ||
if (loadingDelay) { | ||
setTimeout(stopLoading, loadingDelay); | ||
} | ||
}, [loadingDelay, stopLoading]); | ||
|
||
if (isMounted) { | ||
if (loadingDelay) { | ||
setTimeout(() => { | ||
stopLoading(); | ||
onStopLoading && onStopLoading(); | ||
}, loadingDelay); | ||
useEffect(() => { | ||
if (isMounted && !isFirstLoadingInfinite && loadingDelay) { | ||
const timer = setTimeout(stopLoading, loadingDelay); | ||
return () => clearTimeout(timer); | ||
} | ||
} | ||
}, [isMounted, isFirstLoadingInfinite, loadingDelay, stopLoading]); | ||
|
||
return { isLoading, stopLoading, startLoading }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
피그마 보시면 텍스트 변경되어 있어요!
포즈로 말해요 -> 제시어에 맞춰\n포즈를 취해요!