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

[FE] feat: 리뷰 작성 완료 페이지에 홈 버튼 추가 #201

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
21 changes: 20 additions & 1 deletion frontend/src/pages/ReviewWritingCompletePage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
import { useNavigate } from 'react-router';

import PrimaryHomeIcon from '@/assets/primaryHome.svg';
import { Button } from '@/components';

import * as S from './styles';

const ReviewWritingCompletePage = () => {
return <S.Title>😊리뷰 작성을 완료했어요!</S.Title>;
const navigate = useNavigate();

const handleClickHomeButton = () => {
navigate('/home', { replace: true });
};

return (
<S.Container>
<S.Title>😊리뷰 작성을 완료했어요!</S.Title>
<Button styleType="secondary" type="button" onClick={handleClickHomeButton}>
<S.HomeIcon src={PrimaryHomeIcon} />
<S.HomeText>홈으로 돌아가기</S.HomeText>
</Button>
</S.Container>
);
};

export default ReviewWritingCompletePage;
15 changes: 14 additions & 1 deletion frontend/src/pages/ReviewWritingCompletePage/styles.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import styled from '@emotion/styled';

export const Title = styled.div`
export const Container = styled.div`
display: flex;
flex-direction: column;
gap: 5rem;
align-items: center;
justify-content: center;

width: 100%;
height: 100%;
`;

export const Title = styled.p`
font-size: 3rem;
font-weight: bold;
`;

export const HomeIcon = styled.img`
width: 2rem;
height: 2rem;
`;

export const HomeText = styled.p`
margin-left: 0.5rem;
`;