Skip to content

Commit

Permalink
Merge pull request #156 from bankidz/dev
Browse files Browse the repository at this point in the history
배포를 위한 병합
  • Loading branch information
sungwoo-shin authored Aug 5, 2022
2 parents 23737d7 + 8eb65ee commit f85fb47
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 154 deletions.
Empty file removed dummy
Empty file.
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
property="og:description"
content="뱅키와 함께하는 재미있는 어린이 금융경험"
/>
<meta property="og:image" content="%PUBLIC_URL%/og.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
Binary file added public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import FinancialRouter from './pages/Financial';
import NotFound from './pages/NotFound';
import RequireAuth from '@components/auth/RequireAuth';
import PersistLogin from '@components/auth/PersistLogin';
import SungwooTestPage from './pages/SungwooTestPage';
import WalkRouter from './pages/Walk';
import { useEffect } from 'react';

Expand Down Expand Up @@ -40,7 +39,6 @@ function App() {
<Route path="/walk/*" element={<WalkRouter />} />
<Route path="/mypage/*" element={<MypageRouter />} />
<Route path="/financial/*" element={<FinancialRouter />} />
<Route path="/sungwoo" element={<SungwooTestPage />} />
<Route path="*" element={<NotFound />} />
</Route>
{/* </Route> */}
Expand Down
10 changes: 6 additions & 4 deletions src/components/common/Receipt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ ReceiptProps) {
<div className="title">총 소요기간</div>
<div className="content">{weeks}</div>
</div>
<div className="계약종료주차">
<div className="계약종료일">
<div className="text-wrapper">
<div className="title">계약종료 주차</div>
<div className="title">계약종료일</div>
<div className="content">
{`${year}${month}${weekNo}주`}
</div>
Expand Down Expand Up @@ -151,7 +151,7 @@ const Wrapper = styled.div`
`;

const Content = styled.div`
margin: -1px 0; // overlaps 1px
margin: -2px 0; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.grey100};
width: 100%;
height: 360px;
Expand Down Expand Up @@ -283,6 +283,7 @@ const Content = styled.div`
height: 12px;
${({ theme }) => theme.typo.text.S_12_M};
color: ${({ theme }) => theme.palette.greyScale.grey500};
margin-top: 0;
margin-bottom: 8px;
padding: 0;
}
Expand All @@ -294,7 +295,7 @@ const Content = styled.div`
}
}
.계약종료주차 {
.계약종료일 {
width: 66.6%;
height: 70px;
display: flex;
Expand All @@ -307,6 +308,7 @@ const Content = styled.div`
height: 12px;
${({ theme }) => theme.typo.text.S_12_M};
color: ${({ theme }) => theme.palette.greyScale.grey500};
margin-top: 0;
margin-bottom: 8px;
}
.content {
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/modals/QuinaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ function QuinaryModal({
<div className="title">총 소요기간</div>
<div className="content">{weeks}</div>
</div>
<div className="계약종료주차">
<div className="계약종료일">
<div className="text-wrapper">
<div className="title">계약종료 주차</div>
<div className="title">계약종료일</div>
<div className="content">
{`${year}${month}${weekNo}주`}
</div>
Expand Down Expand Up @@ -252,7 +252,7 @@ const Content = styled.div`
`;

const Top = styled.div`
margin: -1px 0; // overlaps 1px
margin: -2px 0; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.white};
height: 116px; // 10px decreased
width: 100%;
Expand All @@ -273,7 +273,7 @@ const Top = styled.div`
`;

const Bottom = styled.div`
margin-bottom: -1px; // overlaps 1px
margin-bottom: -2px; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.white};
width: 100%;
height: 360px; // 10px decreased
Expand Down Expand Up @@ -420,7 +420,7 @@ const Bottom = styled.div`
}
}
.계약종료주차 {
.계약종료일 {
width: 66.6%;
height: 100%;
display: flex;
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/modals/SenaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ function SenaryModal({
<div className="title">총 소요기간</div>
<div className="content">{weeks}</div>
</div>
<div className="계약종료주차">
<div className="계약종료일">
<div className="text-wrapper">
<div className="title">계약종료 주차</div>
<div className="title">계약종료일</div>
<div className="content">
{`${year}${month}${weekNo}주`}
</div>
Expand Down Expand Up @@ -282,7 +282,7 @@ const Content = styled.div`
`;

const Top = styled.div`
margin: -1px 0; // overlaps 1px
margin: -2px 0; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.white};
height: 116px; // 10px decreased
width: 100%;
Expand All @@ -303,7 +303,7 @@ const Top = styled.div`
`;

const Bottom = styled.div`
margin-bottom: -1px; // overlaps 1px
margin-bottom: -2px; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.white};
width: 100%;
height: 350px; // 10px decreased
Expand Down Expand Up @@ -450,7 +450,7 @@ const Bottom = styled.div`
}
}
.계약종료주차 {
.계약종료일 {
width: 66.6%;
height: 100%;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Wrapper = styled.div`
outline: none;
.shape {
margin: 0 -1px;
margin: 0 -1.5px;
flex: 1;
border: none;
outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Wrapper = styled.div`
outline: none;
.shape {
margin: 0 -1px;
margin: 0 -1.5px;
flex: 1;
border: none;
outline: none;
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/modals/quaternaryModal/QuaternaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ function QuaternaryModal({
<div className="title">총 소요기간</div>
<div className="content">{weeks}</div>
</div>
<div className="계약종료주차">
<div className="계약종료일">
<div className="text-wrapper">
<div className="title">계약종료 주차</div>
<div className="title">계약종료일</div>
<div className="content">
{`${year}${month}${weekNo}주`}
</div>
Expand Down Expand Up @@ -289,7 +289,7 @@ const Content = styled.div`
`;

const Top = styled.div`
margin: -1px 0; // overlaps 1px
margin: -2px 0; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.white};
height: 100px;
width: 100%;
Expand All @@ -314,7 +314,7 @@ const Top = styled.div`
`;

const Bottom = styled.div`
margin-bottom: -1px; // overlaps 1px
margin-bottom: -2px; // overlaps 2px
background: ${({ theme }) => theme.palette.greyScale.white};
width: 100%;
height: 360px;
Expand Down Expand Up @@ -461,7 +461,7 @@ const Bottom = styled.div`
}
}
.계약종료주차 {
.계약종료일 {
width: 66.6%;
height: 70px;
display: flex;
Expand Down
55 changes: 33 additions & 22 deletions src/components/home/HomeTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ function HomeTemplate({ children, usage }: HomeTemplateProps) {
// 부모 -> 주어진
headerText = `자녀가 저축에 실패하지\n않도록 격려해주세요`;
}

// 온보딩으로 뒤로가기 차단
const preventGoBack = () => {
history.pushState(null, '', location.href);
};
useEffect(() => {
history.pushState(null, '', location.href);
window.addEventListener('popstate', preventGoBack);
return () => {
window.removeEventListener('popstate', preventGoBack);
};
}, []);
return (
<Wrapper>
<FixedBar colorByLevel={colorByLevel}>
Expand Down Expand Up @@ -185,30 +197,29 @@ const BackgroundBox = styled.div<{
transition: ${({ theme }) => theme.transition.onFocus};
`;

const Background = styled.div<{ colorByLevel: string }>`
position: absolute;
top: 0;
left: 50%;
z-index: 1;
transform: translate3d(-50%, 0, 0);
// const Background = styled.div<{ colorByLevel: string }>`
// position: absolute;
// top: 0;
// left: 50%;
// z-index: 1;
// transform: translate3d(-50%, 0, 0);

height: 288px;
width: 100%;
/* background-color: ${({ colorByLevel }) => colorByLevel}; */
background: red;
// height: 288px;
// width: 100%;
// background-color: ${({ colorByLevel }) => colorByLevel};

&:after {
width: ${calcRatio(530, 360)};
margin: 0 auto;
height: 230px;
background-color: ${({ theme }) => theme.palette.greyScale.white};
border-radius: 50%;
position: absolute;
top: 257px;
left: calc(-${calcRatio(530, 360)} / 2 + 50%);
content: '';
}
`;
// &:after {
// width: ${calcRatio(530, 360)};
// margin: 0 auto;
// height: 230px;
// background-color: ${({ theme }) => theme.palette.greyScale.white};
// border-radius: 50%;
// position: absolute;
// top: 257px;
// left: calc(-${calcRatio(530, 360)} / 2 + 50%);
// content: '';
// }
// `;

const BackgroundEllipse = styled.div<{
colorByLevel: string;
Expand Down
14 changes: 5 additions & 9 deletions src/components/home/SkeletonDongilList.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import styled, { css } from 'styled-components';

export type TSkeletonDongilListUsage =
| 'walking'
| 'pending'
| 'proposed'
| 'thisWeekS';
type TUsage = 'walking' | 'pending' | 'proposed' | 'thisWeekS';

function SkeletonDongilList({ usage }: { usage: TSkeletonDongilListUsage }) {
function SkeletonDongilList({ usage }: { usage: TUsage }) {
return (
<Wrapper usage={usage}>
<Item usage={usage} />
Expand All @@ -18,15 +14,15 @@ function SkeletonDongilList({ usage }: { usage: TSkeletonDongilListUsage }) {

export default SkeletonDongilList;

const Wrapper = styled.div<{ usage: TSkeletonDongilListUsage }>`
const Wrapper = styled.div<{ usage: TUsage }>`
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
`;

const Item = styled.div<{ usage: TSkeletonDongilListUsage }>`
const Item = styled.div<{ usage: TUsage }>`
width: 100%;
background: ${({ theme }) => theme.palette.greyScale.white};
border-radius: ${({ theme }) => theme.radius.medium};
Expand All @@ -41,7 +37,7 @@ const Item = styled.div<{ usage: TSkeletonDongilListUsage }>`
usage === 'pending' &&
css`
height: 68px;
margin-bottom: 12px;
margin-bottom: 8px;
`}
${({ usage }) =>
usage === 'proposed' &&
Expand Down
5 changes: 4 additions & 1 deletion src/pages/Home/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function Detail() {
return found?.challengeList;
}

console.log('targetDongil: ', targetDongil!);
const {
isMom,
title,
Expand All @@ -77,6 +78,8 @@ function Detail() {
weeks,
progressList,
successWeeks,
isAchieved,
status,
} = targetDongil!;

const percent = Math.ceil((successWeeks / weeks / 10) * 100) * 10;
Expand Down Expand Up @@ -184,7 +187,7 @@ function Detail() {
)}
</div>
</DongilContractContent>
{isKid === true && (
{isKid === true && !(isAchieved === 0 && status === 0) && (
<GiveUpDongilButton onClick={onGiveUpCheckOpen}>
돈길 포기하기
</GiveUpDongilButton>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Mypage/Mypage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const DemoKidsRecordData = [
{
username: '주어진',
acceptRate: 80,
acceptRequest: 4,
achieveRate: 25,
acceptRequest: 5,
achieveRate: 20,
},
{
username: '한규진',
Expand Down
Loading

0 comments on commit f85fb47

Please sign in to comment.