Skip to content

Commit

Permalink
Merge pull request #40 from RedCross-Revive-Hackthon/fix/#38/trivialE…
Browse files Browse the repository at this point in the history
…rror

Fix/#38/trivial error
  • Loading branch information
simeunseo authored Aug 24, 2023
2 parents 54e3ff1 + 5df485c commit 59c9e8d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 56 deletions.
4 changes: 2 additions & 2 deletions src/components/common/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Footer = () => {
</IconSection>
</IconContainer>
<IconArea />
{location === '/community' ? (
{location === '/community' || location === '/community/give/1' ? (
<Link to="#">
<StyledPostBtn />
</Link>
Expand All @@ -42,7 +42,7 @@ export default Footer;

const FooterWrapper = styled.footer`
position: fixed;
bottom: 0;
bottom: -0.2rem;
width: 37.5rem;
`;

Expand Down
5 changes: 3 additions & 2 deletions src/components/home/Rank.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Down, Up } from '../icon/icon';

import { DefaultUser } from '../icon/icon';
import React from 'react';
import Text from '../common/Text';
import { Up } from '../icon/icon';
import hideName from '../../utils/hideName';
import { styled } from 'styled-components';
import { theme } from '../../styles/theme';
Expand Down Expand Up @@ -35,7 +36,7 @@ const Rank = ({ onClick, name, department, score, rank, state }: RankProps) => {
<Text font="point3" color={theme.colors.black}>
{score.toLocaleString()}
</Text>
<Up />
{state === 'up' ? <Up /> : <Down />}
</RightSide>
</RankWrapper>
);
Expand Down
70 changes: 25 additions & 45 deletions src/components/home/RankList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,73 +9,52 @@ import { useRecoilState } from 'recoil';
const RANK_LIST = [
{
rank: 4,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
name: '이재훈',
department: '컴퓨터정보공학과',
score: 9800,
state: 'up',
},
{
rank: 5,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
state: 'up',
name: '도소현',
department: '컴퓨터공학과',
score: 7700,
state: 'down',
},
{
rank: 6,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
state: 'up',
name: '서지원',
department: '언론홍보학과',
score: 6500,
state: 'down',
},
{
rank: 7,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
name: '강민서',
department: '시각디자인학과',
score: 6400,
state: 'up',
},
{
rank: 8,
name: '홍길동',
department: '디자인조형학부',
name: '김태희',
department: '융합콘텐츠학과',
score: 4500,
state: 'up',
},
{
rank: 9,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
name: '이동헌',
department: '사회학과',
score: 2500,
state: 'up',
},
{
rank: 9,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
state: 'up',
},
{
rank: 9,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
state: 'up',
},
{
rank: 9,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
state: 'up',
},
{
rank: 9,
name: '홍길동',
department: '디자인조형학부',
score: 4500,
state: 'up',
rank: 10,
name: '정찬우',
department: '국제법무학과',
score: 1800,
state: 'down',
},
];
const RankList = () => {
Expand Down Expand Up @@ -109,5 +88,6 @@ const RankListWrapper = styled.div`
flex-direction: column;
gap: 1.4rem;
margin-top: 2rem;
margin-bottom: 15rem;
width: 100%;
`;
18 changes: 11 additions & 7 deletions src/pages/Barcode.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from 'react';

import BarcodeCamera from '../components/barcode/BarcodeCamera';
import { Link } from 'react-router-dom';
import Text from '../components/common/Text';
import { styled } from 'styled-components';
import { theme } from '../styles/theme';
Expand All @@ -14,11 +15,13 @@ const Barcode = () => {
</Text>
</BarcodeTitle>
<BarcodeCamera />
<ConfirmBtn>
<Text font="point1" color={theme.colors.white}>
인식 완료
</Text>
</ConfirmBtn>
<Link to="/certification">
<ConfirmBtn>
<Text font="point2" color={theme.colors.white}>
헌혈증 등록하기
</Text>
</ConfirmBtn>
</Link>
</>
);
};
Expand All @@ -33,8 +36,9 @@ const ConfirmBtn = styled.button`
display: flex;
justify-content: center;
margin-top: 5rem;
border-radius: 2rem;
background: ${theme.colors.black};
border-radius: 1.4rem;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.25);
background: var(--deepred, #ff0a00);
padding: 2rem;
width: 24rem;
`;

0 comments on commit 59c9e8d

Please sign in to comment.