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

Refactor/컴포넌트디렉토리구조변경 #49

Merged
merged 2 commits into from
Jul 10, 2022
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import styled from 'styled-components';
import SelectInterestButton from '../../../challenge/SelectInterestButton';
import SelectInterestButton from '../../../kid/challenge/SelectInterestButton';

function SelectInterest() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback } from 'react';
import styled, { css } from 'styled-components';
import RiskBadge from '../badges/RiskBadge';
import RiskBadge from '../../common/badges/RiskBadge';

interface SelectInterestButtonProps {
isSelected: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ComponentStory, ComponentMeta } from '@storybook/react';
import Margin from '../layout/Margin';
import Margin from '../../layout/Margin';
import Pending from './Pending';

export default {
title: '자녀 홈/Pending',
title: 'Kid/home/Pending',
component: Pending,
argTypes: { onClick: { action: 'event' } },
decorators: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HTMLAttributes } from 'react';
import styled from 'styled-components';
import SuggestBadge from '../badges/SuggestBadge';
import SuggestBadge from '../../common/badges/SuggestBadge';

interface PendingProps extends HTMLAttributes<HTMLButtonElement> {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ComponentStory, ComponentMeta } from '@storybook/react';
import Margin from '../layout/Margin';
import Margin from '../../layout/Margin';
import Summary from './Summary';

// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
export default {
title: '자녀 홈/Summary',
title: 'Kid/home/Summary',
component: Summary,
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
decorators: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components';
import { ReactComponent as SummaryWrapper } from '../../assets/icons/homeKid-summary.svg';
import { ReactComponent as SummaryWrapper } from '../../../assets/icons/homeKid-summary.svg';

interface SummaryProps {
/**
Expand Down
1 change: 0 additions & 1 deletion src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Outlet, useLocation } from 'react-router-dom';
import styled from 'styled-components';
import { media } from '../../lib/styles/theme';
import { useMediaQuery } from 'react-responsive';
import { borderRadius } from 'polished';

function Layout() {
const { pathname } = useLocation();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function HomeRouter({ isKid }: AppProps) {
}
/>
<Route
path="/create"
path="/create/:step"
element={
<Stacked label="돈길 만들기">
<CreateKid />
Expand Down
4 changes: 4 additions & 0 deletions src/pages/Home/kid/CreateKid.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { useParams } from 'react-router-dom';

function CreateKid() {
const { step } = useParams();
console.log(step);
return <>자녀-돈길만들기</>;
}

Expand Down