Skip to content

Commit

Permalink
Merge branch 'feat/#29/footerNavigation' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Aug 24, 2023
2 parents e0797ae + 6b29c31 commit 54e3ff1
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 6 deletions.
22 changes: 22 additions & 0 deletions src/assets/svgs/postBtn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions src/components/common/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Community, CommunityRed, Event, EventRed, Home, HomeRed, Volunteer, Vol
import { IconArea } from '../icon/icon';
import { Link } from 'react-router-dom';
import { PlusBtn } from '../icon/icon';
import { PostBtn } from '../icon/icon';
import React from 'react';
import { styled } from 'styled-components';
import { theme } from '../../styles/theme';
Expand All @@ -24,9 +25,15 @@ const Footer = () => {
</IconSection>
</IconContainer>
<IconArea />
<Link to="/barcode">
<StyledPlusBtn />
</Link>
{location === '/community' ? (
<Link to="#">
<StyledPostBtn />
</Link>
) : (
<Link to="/barcode">
<StyledPlusBtn />
</Link>
)}
</FooterWrapper>
);
};
Expand All @@ -46,6 +53,13 @@ const StyledPlusBtn = styled(PlusBtn)`
transform: translate(-3.7rem, 0);
`;

const StyledPostBtn = styled(PostBtn)`
position: absolute;
bottom: 5.3rem;
left: 50%;
transform: translate(-3.7rem, 0);
`;

const IconContainer = styled.div`
display: flex;
position: absolute;
Expand Down
3 changes: 2 additions & 1 deletion src/components/community/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useRecoilState } from 'recoil';

const Header = () => {
const [currentTap, setCurrentTap] = useRecoilState(communityTapState);

const handleTap = () => {
setCurrentTap(!currentTap);
};
Expand Down Expand Up @@ -51,7 +52,7 @@ const HeaderWrapper = styled.header`
const HeaderTap = styled.div<{ $isCurrentTap: boolean }>`
display: flex;
justify-content: center;
border-bottom: 0.2rem solid ${(props) => (props.isCurrentTap ? theme.colors.deepred : theme.colors.gray01)};
border-bottom: 0.2rem solid ${(props) => (props.$isCurrentTap ? theme.colors.deepred : theme.colors.gray01)};
cursor: pointer;
width: 100%;
height: 5.6rem;
Expand Down
6 changes: 4 additions & 2 deletions src/components/home/RankTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Link } from 'react-router-dom';
import { MyPage } from '../icon/icon';
import React from 'react';
import Text from '../common/Text';
import { styled } from 'styled-components';
import { theme } from '../../styles/theme';

const dummy = {
university: '적십자대학교',
name: '홍길동',
Expand All @@ -26,7 +26,9 @@ const RankTitle = () => {
</Text>
</MainTextWrapper>
</TextWrapper>
<MyPage />
<Link to="/mypage">
<MyPage />
</Link>
</RankTitleWrapper>
);
};
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { ReactComponent as MyPage } from '../../assets/svgs/myPage.svg';
import { ReactComponent as MypageBackground } from '../../assets/svgs/mypageBackground.svg';
import { ReactComponent as NotChecked } from '../../assets/svgs/notChecked.svg';
import { ReactComponent as PlusBtn } from '../../assets/svgs/PlusBtn.svg';
import { ReactComponent as PostBtn } from '../../assets/svgs/postBtn.svg';
import { ReactComponent as SecondPlace } from '../../assets/svgs/secondPlace.svg';
import { ReactComponent as ThirdPlace } from '../../assets/svgs/thirdPlace.svg';
import { ReactComponent as Trophy } from '../../assets/svgs/trophy.svg';
Expand All @@ -45,6 +46,7 @@ export {
Checked,
NotChecked,
DetailPost,
PostBtn,
VolunteerRed,
HomeRed,
EventRed,
Expand Down

0 comments on commit 54e3ff1

Please sign in to comment.