Skip to content

Commit

Permalink
🎨 완료페이지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
woobottle committed Dec 13, 2023
1 parent 088b61a commit b79e42f
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/app/complete/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { type PropsWithChildren } from 'react';
import { css } from '@styled-system/css';

export default function Layout({ children }: PropsWithChildren) {
return <div className={containerCss}>{children}</div>;
}

const containerCss = css({
maxWidth: '475px',
margin: '0 auto',
minHeight: '100vh',

display: 'flex',
flexDirection: 'column',
flex: 1,
});
72 changes: 72 additions & 0 deletions src/app/complete/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
'use client';
import lottieJson from '@/assets/lotties/lottieExample.json';
import Button from '@/components/Button/Button';
import { css } from '@styled-system/css';
import Lottie from 'react-lottie-player';

export default function CompletePage() {
return (
<main className={mainWrapperCss}>
<div className={containerCss}>
<div className={contentWrapperCss}>
<div className={titleWrapperCss}>
<span className={titleCss}>오늘의 미션완료!</span>
<span className={subTitleCss}>{'잘 하셨어요, 오늘도 한 걸음 성장하셨네요 :)'}</span>
</div>
<div className={lottieWrapperCss}>
<Lottie loop animationData={lottieJson} play />
</div>
</div>
<Button type="button" size="large" variant="primary">
<span className={buttonTextCss}>확인</span>
</Button>
</div>
</main>
);
}

const mainWrapperCss = css({
display: 'flex',
flexDirection: 'column',
backgroundColor: 'bg.surface2',
height: '100vh',
});

const containerCss = css({
display: 'flex',
flex: 1,
flexDirection: 'column',
justifyContent: 'space-between',
padding: '16px 24px',
});

const contentWrapperCss = css({
flex: 1,
justifyContent: 'center',
display: 'flex',
flexDirection: 'column',
gap: '25px',
});

const titleWrapperCss = css({
display: 'flex',
flexDirection: 'column',
textAlign: 'center',
gap: '4px',
});

const titleCss = css({
textStyle: 'title2',
color: 'text.primary',
});

const subTitleCss = css({
textStyle: 'body2',
color: 'text.secondary',
});

const lottieWrapperCss = css({});

const buttonTextCss = css({
textStyle: 'subtitle4',
});

0 comments on commit b79e42f

Please sign in to comment.