Skip to content

Commit

Permalink
Merge branch 'develop' into comment/113
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokyeom committed Jul 20, 2022
2 parents 09552a3 + eaf26db commit 2529c9a
Show file tree
Hide file tree
Showing 12 changed files with 134 additions and 207 deletions.
5 changes: 3 additions & 2 deletions components/collectionProduct/ToyPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export default function ToyPreview(props: ToyPreviewProps) {
const { src, store, title, price, age, siteUrl } = props;
const [isMark, setIsMark] = useState(false);

const handleToySite = () => {
window.open(siteUrl);
const handleToySite = (e: React.MouseEvent<HTMLElement>) => {
if (!(e.target instanceof SVGElement)) window.open(siteUrl);
};

const handleToyMark = () => {
setIsMark((prev) => !prev);
};
Expand Down
56 changes: 0 additions & 56 deletions components/common/ToyList.tsx

This file was deleted.

123 changes: 0 additions & 123 deletions components/common/ToyPreview.tsx

This file was deleted.

22 changes: 11 additions & 11 deletions components/main/CollectionCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import styled from '@emotion/styled';
import Router from 'next/router';
import {
IcKitchenPlay,
IcMultiToy,
IcWalkingMachine,
IcCollectionWalk,
IcCollectionPeople,
IcCollectionPlayground,
} from '../../public/assets/icons';

interface CollectionCardProps {
Expand All @@ -22,9 +22,9 @@ export default function CollectionCard(props: CollectionCardProps) {
};
return (
<StCardWrapper onClick={handleCollectionPage}>
{title === '์˜์„œ, ๋ณดํ–‰๊ธฐ ๋ชจ์Œ' && <IcWalkingMachine />}
{title === '๋‹ค์ธ์› ์žฅ๋‚œ๊ฐ ์ถ”์ฒœ' && <IcKitchenPlay />}
{title === '์ฃผ๋ฐฉ๋†€์ด ์„ธํŠธ' && <IcMultiToy />}
{title === '์œ„๊ณ , ๋ณดํ–‰๊ธฐ ๋ชจ์Œ' && <IcCollectionWalk />}
{title === '์‹ค๋‚ด ๋†€์ดํ„ฐ ์ถ”์ฒœ' && <IcCollectionPlayground />}
{title === '๋‹ค์ธ์› ์žฅ๋‚œ๊ฐ ์„ธํŠธ' && <IcCollectionPeople />}
<StSubTitle>{subTitle}</StSubTitle>
<StTitle>{title}</StTitle>
</StCardWrapper>
Expand All @@ -37,18 +37,18 @@ const StCardWrapper = styled.section`
align-items: center;
flex-direction: column;
width: 37.1rem;
width: 37.2rem;
height: 26.5rem;
margin: 0rem 1.5rem 8rem;
margin: 0rem 1.5rem;
border-radius: 1.5rem;
border-radius: 1.2rem;
background-color: ${({ theme }) => theme.colors.white};
box-shadow: 0.193473rem 0.193473rem 0.43683rem rgba(29, 185, 129, 0.3);
box-shadow: 1.93473px 1.93473px 48.3683px rgba(29, 185, 129, 0.3);
cursor: pointer;
`;
const StSubTitle = styled.div`
margin-top: 1.8rem;
margin-top: 2.61rem;
margin-bottom: 0.5rem;
${({ theme }) => theme.fonts.b3_16_medium_140}
Expand Down
4 changes: 2 additions & 2 deletions components/main/ToyPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default function ToyPreview(props: ToyPreviewProps) {
const { src, store, title, price, age, siteUrl } = props;
const [isMark, setIsMark] = useState(false);

const handleToySite = () => {
window.open(siteUrl);
const handleToySite = (e: React.MouseEvent<HTMLElement>) => {
if (!(e.target instanceof SVGElement)) window.open(siteUrl);
};

const handleToyMark = () => {
Expand Down
4 changes: 2 additions & 2 deletions components/viewProduct/ToyPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default function ToyPreview(props: ToyPreviewProps) {
const { src, store, title, price, age, siteUrl } = props;
const [isMark, setIsMark] = useState(false);

const handleToySite = () => {
window.open(siteUrl);
const handleToySite = (e: React.MouseEvent<HTMLElement>) => {
if (!(e.target instanceof SVGElement)) window.open(siteUrl);
};

const handleToyMark = () => {
Expand Down
5 changes: 0 additions & 5 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ import theme from '../styles/theme';
import { SessionProvider } from 'next-auth/react';
import { useRouter } from 'next/router';

if (process.env.NEXT_PUBLIC_API_MOCKING === 'enabled') {
import('../mocks');
}

export default function App({
Component,
pageProps: { session, ...pageProps },
}: AppProps) {
const { pathname } = useRouter();

// ์•ˆ๋…• ์ง„์งœ ๋„ˆ๋ฌด ์ข‹๋‹ค ๊ฐˆ์ถ• ์ตœ๊ณ 
return (
<RecoilRoot>
<ThemeProvider theme={theme}>
Expand Down
13 changes: 7 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import { ToyList } from '../components/main';
export default function main() {
const collection = [
{
title: '์˜์„œ, ๋ณดํ–‰๊ธฐ ๋ชจ์Œ',
subTitle: '์šฐ๋ฆฌ์•„์ด ๊ฑธ์Œ๋งˆ๋ฅผ ์œ„ํ•œ',
title: '์œ„๊ณ , ๋ณดํ–‰๊ธฐ ๋ชจ์Œ',
subTitle: '์šฐ๋ฆฌ ์•„์ด ๊ฑธ์Œ๋งˆ๋ฅผ ์œ„ํ•œ',
},
{
title: '์ฃผ๋ฐฉ๋†€์ด ์„ธํŠธ',
subTitle: '์˜ค๊ฐ ๋ฐœ๋‹ฌ ์•„์ด๋“ค์ด ์ข‹์•„ํ•˜๋Š”',
title: '์‹ค๋‚ด ๋†€์ดํ„ฐ ์ถ”์ฒœ',
subTitle: '๋‚ ์”จ ๊ฑฑ์ • ์—†๋Š” ์šฐ๋ฆฌ ์ง‘',
},
{
title: '๋‹ค์ธ์› ์žฅ๋‚œ๊ฐ ์ถ”์ฒœ',
title: '๋‹ค์ธ์› ์žฅ๋‚œ๊ฐ ์„ธํŠธ',
subTitle: '์นœ๊ตฌ๋“ค๊ณผ ํ•จ๊ป˜',
},
];
Expand Down Expand Up @@ -73,7 +73,8 @@ const StConceptArticle = styled.article`
`;
const StCollectionArticle = styled.article`
width: 100%;
margin-top: 8.9rem;
height: 47.9rem;
margin-top: 8.4rem;
background-color: ${({ theme }) => theme.colors.lightGreen};
`;
Expand Down
36 changes: 36 additions & 0 deletions public/assets/icons/card_collection_1_walk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2529c9a

Please sign in to comment.