Skip to content
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

[GGFE-228] 에러페이지 이모지 수정 + 스토리북 추가 #974

Merged
merged 5 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions components/error/Error.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import ErrorEmoji from 'public/image/noti_empty.svg';
import useErrorPage from 'hooks/error/useErrorPage';
import styles from 'styles/Error.module.scss';
import DizzyFace from '/public/image/dizzyface.svg';
import DizzyFaceNoMouth from '/public/image/dizzyface-no_mouth.svg';
import DizzyFaceLikeNoti from '/public/image/dizzyface-like_noti.svg';
import DizzyFaceLikeNoti2 from '/public/image/dizzyface-like_noti_2.svg';

export default function ErrorPage() {
const { error, goHome } = useErrorPage();
Expand All @@ -21,7 +23,10 @@ export default function ErrorPage() {
<div></div>
<div></div>
</div>
<ErrorEmoji />
<DizzyFaceNoMouth />
<DizzyFaceLikeNoti />
<DizzyFaceLikeNoti2 />
<DizzyFace />
</div>
</div>
<div className={styles.home} onClick={goHome}>
Expand Down
2 changes: 1 addition & 1 deletion hooks/error/useErrorPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect } from 'react';
import { useRecoilState } from 'recoil';
import { errorState } from 'utils/recoil/error';

export const useErrorPage = () => {
const useErrorPage = () => {
const [error, setError] = useRecoilState(errorState);
const router = useRouter();

Expand Down
2 changes: 2 additions & 0 deletions public/image/dizzyface-like_noti.svg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이게 제일 좋은 것 같아요!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 이게 좋은 것 같아요!

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions public/image/dizzyface-like_noti_2.svg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아니면 이거도 괜찮구요!!

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions public/image/dizzyface-no_mouth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/image/dizzyface.svg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으로는 입이 없고 눈 색깔이 눈썹 색이랑 같으면 좋을 것 같아요! 다른 분들 의견도 들어봐야할 것 같습니당

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 기존 noti_empty.svg 와 비슷하게 X자 모양의 눈만 남기는것도 좋을 것 같아요! (눈 색도 noti_empty.svg와 동일하게)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

말씀해주신 내용 반영해서 2가지 버전 추가해놨습니다! 말씀하신 내용대로 최대한 해봤는데 원하시는데로 된건지 모르겠네요 🫠

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 public/image/noti_empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions stories/error.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { useEffect } from 'react';
import { useSetRecoilState } from 'recoil';
import type { Meta, StoryObj } from '@storybook/react';
import { errorState } from 'utils/recoil/error';
import ErrorPage from 'components/error/Error';

const meta: Meta = {
title: '/ErrorPage',
component: ErrorPage,
};

export default meta;
type Story = StoryObj<typeof ErrorPage>;

function useSetError() {
const setError = useSetRecoilState(errorState);

useEffect(() => {
setError('HJ00');
}, []);
}

const ErrorDefault = () => {
useSetError();
return <ErrorPage />;
};

export const Default: Story = {
render: () => <ErrorDefault />,
};