Skip to content

Commit 2bec6e7

Browse files
committed
✨ feat: add start over button
1 parent 6f363e5 commit 2bec6e7

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/pages/result/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React, { FC } from 'react';
22

3+
import Button from '~/components/Button';
34
import Layout from '~/Layout';
45

56
import { useRepository } from '~/hooks/repository';
67

78
import trophy from '~/assets/trophy.svg';
89

9-
import { Header, Podium, Rank, Position } from './styles';
10+
import { Header, Podium, Rank, Position, ButtonContainer } from './styles';
1011

1112
const Result: FC = () => {
1213
const { owner, repoName, fighters } = useRepository();
@@ -42,6 +43,9 @@ const Result: FC = () => {
4243
</li>
4344
))}
4445
</Podium>
46+
<ButtonContainer>
47+
<Button to="/battlefield">Start Over</Button>
48+
</ButtonContainer>
4549
<Rank>
4650
{placing.map((fighter, index) => (
4751
<Position key={fighter.id}>

src/pages/result/styles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,8 @@ export const Position = styled(card).attrs({
152152
transform: translateX(14px) translateZ(0);
153153
}
154154
`;
155+
156+
export const ButtonContainer = styled.div`
157+
display: flex;
158+
justify-content: center;
159+
`;

0 commit comments

Comments
 (0)