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

[토너먼트] 토너먼트 인트로 화면 퍼블리싱 및 랜더링 #67

Merged
merged 11 commits into from
Jan 11, 2024
1 change: 0 additions & 1 deletion src/assets/svg/IcCancelCircleFinal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const SvgIcCancelCircleFinal = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' {...props}>
Expand Down
12 changes: 0 additions & 12 deletions src/components/TournamentFlowContainer.tsx

This file was deleted.

12 changes: 12 additions & 0 deletions src/components/tournament/TournamentFlowContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import TournamentCard from './tournamentFlow/tournamentCard/TournamentCard';
import TournamentFooter from './tournamentFlow/tournamentFooter/TournamentFooter';
const TournamentFlowContainer = () => {
return (
<>
<TournamentCard />
<TournamentFooter />
</>
);
};

export default TournamentFlowContainer;
38 changes: 24 additions & 14 deletions src/components/tournament/intro/TournamentContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
import TournamentStartText from './tournamentStartText/TournamentStartText';
import TournamentItemCount from './tournamentItemCount/TournamentItemCount';
import styled from 'styled-components';
import * as S from './TournamentContatiner.style';
import { Svg3Dicons } from '../../../assets/svg';
import TournamentStartButton from './tournamentStartButton/TournamentStartButton';
import { useState } from 'react';
import TournamentFlowContainer from '../TournamentFlowContainer';

export default function TournamentConatainer() {
const TournamentContainer = () => {
const [showTournamentContainer, setShowTournamentContainer] = useState(true);

const handleStartClick = () => {
setShowTournamentContainer(false);
};
return (
<>
<TournamentStartText />
<TournamentItemCount />
<TournamentImg>
<Svg3Dicons />
</TournamentImg>
{/* 공통버튼 btn_cta_fill 들어갈 예정*/}
{showTournamentContainer && (
<>
<TournamentStartText />
<TournamentItemCount />
<S.TournamentImg>
<Svg3Dicons />
</S.TournamentImg>
<TournamentStartButton onClick={handleStartClick} />
</>
)}

{!showTournamentContainer && <TournamentFlowContainer />}
</>
);
}
};

const TournamentImg = styled.div`
width: 20rem;
height: 20rem;
margin: 0 auto;
`;
export default TournamentContainer;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from "styled-components";

export const TournamentImg = styled.div`
width: 20rem;
height: 20rem;
margin: 0 auto;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from 'styled-components';

export const TournamentStartButtonWrapper = styled.div`
position: absolute;
margin-bottom: 2rem;
bottom: 0;
`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
export default function TournamentStartButton() {
import React from 'react';
import BtnFill from '../../../common/Button/Cta/fill/BtnFill';
import * as S from './TournamentStartButton.style';

interface TournamentStartButtonProps {
onClick: () => void;
}

const TournamentStartButton: React.FC<TournamentStartButtonProps> = ({ onClick }) => {
return (
<div>
<button>시작하기</button>
</div>
<S.TournamentStartButtonWrapper>
<BtnFill customStyle={{ backgroundColor: '#FF2176', border: 'none' }} onClick={onClick}>
시작하기
</BtnFill>
</S.TournamentStartButtonWrapper>
);
}
};

export default TournamentStartButton;
2 changes: 1 addition & 1 deletion src/pages/TournamentOngoing.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TournamentFlowContainer from '../components/TournamentFlowContainer';
import TournamentFlowContainer from '../components/tournament/TournamentFlowContainer';

const TournamentOngoing = () => {
return (
Expand Down
6 changes: 3 additions & 3 deletions src/pages/TournamentPage.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import styled from 'styled-components';
import TournamentConatainer from '../components/tournament/intro/TournamentContainer';
import TournamentContainer from '../components/tournament/intro/TournamentContainer';

const TournamentPage = () => {
return (
<TournamentPageWrapper>
<TournamentConatainer />
<TournamentContainer />
</TournamentPageWrapper>
);
};

export default TournamentPage;

const TournamentPageWrapper = styled.section`
margin: 0 2rem;
padding: 1.2rem 2rem 0 2rem;
`;