-
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
#277 업데이트 알림 뷰 #281
#277 업데이트 알림 뷰 #281
Changes from all commits
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,16 +1,15 @@ | ||
import { versionUpdateList } from "../../../util/main/versionUpdateList"; | ||
import { VERSION_UPDATES } from "../../../util/main/versionUpdateList"; | ||
import Modal from "../../@common/Modal"; | ||
import useUpdateModal from "../hooks/useUpdateModal"; | ||
import * as St from "./style"; | ||
|
||
interface UpdateModalProps { | ||
closeHandler: () => void; | ||
} | ||
export default function UpdateModal() { | ||
const { isOpened, handleCloseModal } = useUpdateModal(); | ||
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. 훅을 컴포넌트 내에 위치시켰습니다! 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. 오왓 이런 방법이,,! |
||
|
||
export default function UpdateModal(props: UpdateModalProps) { | ||
const { closeHandler } = props; | ||
if (!isOpened) return null; | ||
|
||
return ( | ||
<Modal theme="GRAY_BOTTOM" closeHandler={closeHandler}> | ||
<Modal theme="GRAY_BOTTOM" closeHandler={handleCloseModal} isNoCloseBtn={true}> | ||
<St.Container> | ||
<St.Tag>23.04.20 업데이트</St.Tag> | ||
<St.Title>피클 업데이트 안내</St.Title> | ||
|
@@ -20,13 +19,13 @@ export default function UpdateModal(props: UpdateModalProps) { | |
지금 하는 안내는 1주일 정도만 유지되니 이해 부탁드릴게요! | ||
</St.Description> | ||
<St.UpdateLists> | ||
{versionUpdateList.map((versionUpdateList) => ( | ||
<St.ContentsWrapper key={versionUpdateList.id}> | ||
✅<St.Content>{versionUpdateList.content}</St.Content> | ||
{VERSION_UPDATES.map((versionUpdate) => ( | ||
<St.ContentsWrapper key={versionUpdate.id}> | ||
✅<St.Content>{versionUpdate.content}</St.Content> | ||
</St.ContentsWrapper> | ||
))} | ||
</St.UpdateLists> | ||
<St.CheckBtn onClick={closeHandler}>확인했어요</St.CheckBtn> | ||
<St.CheckBtn onClick={handleCloseModal}>확인했어요</St.CheckBtn> | ||
</St.Container> | ||
</Modal> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
import { lazy } from "react"; | ||
|
||
import Footer from "../@common/Footer"; | ||
import Header from "../@common/Header"; | ||
import useGTMPage from "../@common/hooks/useGTMPage"; | ||
import Banner from "./Banner"; | ||
import BestPiickle from "./BestPiickle"; | ||
import CTABtn from "./CTABtn"; | ||
import useUpdateModal from "./hooks/useUpdateModal"; | ||
import Medley from "./Medley"; | ||
import MoodPiickle from "./MoodPiickle"; | ||
import PiickleMe from "./PiickleMe"; | ||
import StripBanner from "./StripBanner"; | ||
import { St } from "./style"; | ||
import UpdateModal from "./UpdateModal"; | ||
|
||
const UpdateModal = lazy(() => import("./UpdateModal")); | ||
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. 전체 UI가 나온 이후에, 업데이트 모달창을 띄우고 싶었습니다.! 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. 오오오오옹 새로운 거 배워갑니다:) |
||
|
||
export default function MainPage() { | ||
const { isOpened, handleCloseModal } = useUpdateModal(); | ||
useGTMPage(); | ||
|
||
return ( | ||
|
@@ -27,7 +28,7 @@ export default function MainPage() { | |
<PiickleMe /> | ||
<Footer /> | ||
<CTABtn /> | ||
{isOpened && <UpdateModal closeHandler={handleCloseModal} />} | ||
<UpdateModal /> | ||
</St.MainPage> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
type VersionUpdateList = { | ||
type VersionUpdate = { | ||
id: number; | ||
content: string; | ||
}; | ||
|
||
export const versionUpdateList: VersionUpdateList[] = [ | ||
export const VERSION_UPDATES: VersionUpdate[] = [ | ||
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. 이렇게 하눈거구나~ 이거 넘나 헷갈리는고!-! util 폴더의 비슷한 다른 파일들 참고했는데, Upper Case로 바꾸면 좋을 것들이 많을 것 같네용:) 변수명을 다 바꿨길래 궁금한건데용 파일명은 일부러 안바꾸신거겠죠? 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. @NYeonK 생각 못했어요 하하하 바꾸셔도 좋습니다 !!!!!!!!! |
||
{ id: 1, content: "카드 넘기기가 세로 스크롤로 변경 되었어요!" }, | ||
{ id: 2, content: "북마크 이모티콘이 변경 되었어요!" }, | ||
{ id: 3, content: "19금 대화주제 필터를 오픈했어요!" }, | ||
|
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.
왐마야 반영을 안했네 이고..ㅎ 거마워용>,<