Skip to content

Commit 6327126

Browse files
authored
Merge pull request #101 from prgrms-web-devcourse-final-project/43-design/design-social-page
[Design] #43 소셜 관련 페이지
2 parents 6b54d59 + bc61357 commit 6327126

File tree

44 files changed

+882
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+882
-123
lines changed

src/App.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import PWABadge from '~/PWABadge'
2-
import { router } from '~/router'
3-
import GlobalStyle from '~/styles/globalStyle'
4-
import { lightTheme, darkTheme } from '~/styles/theme'
51
import { Suspense, useState } from 'react'
2+
import { Helmet, HelmetProvider } from 'react-helmet-async'
63
import { RouterProvider } from 'react-router-dom'
74
import styled, { ThemeProvider } from 'styled-components'
8-
import { Helmet, HelmetProvider } from 'react-helmet-async'
9-
import ModalContainer from '~modals/ModalContainer'
5+
import PWABadge from '~/PWABadge'
6+
import { router } from '~/router'
7+
import GlobalStyle from '~/styles/globalStyle'
8+
import { darkTheme, lightTheme } from '~/styles/theme'
109
import Loader from '~components/Loader'
1110

1211
function App() {
@@ -28,7 +27,6 @@ function App() {
2827
<MobileContainer>
2928
<Suspense fallback={<Loader />}>
3029
<RouterProvider router={router} />
31-
<ModalContainer />
3230
</Suspense>
3331
</MobileContainer>
3432
<PWABadge />

src/assets/dog_food.svg

Lines changed: 37 additions & 0 deletions
Loading

src/assets/dog_howling.svg

Lines changed: 18 additions & 0 deletions
Loading

src/components/Footer/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import { FaRegCalendarCheck } from 'react-icons/fa6'
33
import { IoMdPeople } from 'react-icons/io'
44
import { IoHomeSharp } from 'react-icons/io5'
55
import { MdOutlineFamilyRestroom } from 'react-icons/md'
6-
import { Link } from 'react-router-dom'
76
import { useTheme } from 'styled-components'
87
import { Typo11 } from '~components/Typo'
98
import * as S from './styles'
109

1110
const FOOTER_NAV_LIST = [
1211
{ Icon: IoHomeSharp, endpoint: '/', typo: '홈' },
1312
{ Icon: FaRegCalendarCheck, endpoint: '/log', typo: '댕댕로그' },
14-
{ Icon: IoMdPeople, endpoint: '/walk', typo: '소셜' },
13+
{ Icon: IoMdPeople, endpoint: '/social', typo: '소셜' },
1514
{
1615
Icon: MdOutlineFamilyRestroom,
1716
endpoint: '/mypage',
@@ -28,9 +27,9 @@ export default function Footer() {
2827
<S.Footer>
2928
<S.FooterNavList>
3029
{FOOTER_NAV_LIST.map(({ Icon, endpoint, typo }, index) => (
31-
<S.FooterNavItem key={index}>
32-
<Link to={endpoint}>{<Icon color={theme.colors.brand.default} size={28} />}</Link>
33-
<Typo11 weight='500' color='font_3'>
30+
<S.FooterNavItem key={index} to={endpoint}>
31+
<Icon color={theme.colors.brand.default} size={28} />
32+
<Typo11 $weight='500' $color='font_3'>
3433
{typo}
3534
</Typo11>
3635
</S.FooterNavItem>

src/components/Footer/styles.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1+
import { Link } from 'react-router-dom'
12
import { styled } from 'styled-components'
3+
import { FOOTER_HEIGHT } from '~constants/layout'
24

3-
export const Footer = styled.nav``
5+
export const Footer = styled.footer`
6+
height: ${FOOTER_HEIGHT}px;
7+
position: fixed;
8+
width: 100%;
9+
bottom: 0;
10+
background-color: ${({ theme }) => theme.colors.grayscale.gc_4};
11+
box-shadow: inset 0 1px 0 0 ${({ theme }) => theme.colors.grayscale.gc_1};
12+
`
413

514
export const FooterNavList = styled.ul`
615
display: flex;
716
justify-content: space-between;
17+
height: 100%;
818
`
919

10-
export const FooterNavItem = styled.li`
20+
export const FooterNavItem = styled(Link)`
1121
flex: 1;
1222
display: flex;
1323
flex-direction: column;
1424
align-items: center;
1525
justify-content: center;
26+
text-decoration: none;
1627
`

src/components/GenderSelectButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function GenderSelectButton({ gender, isActive, onClick }: Gender
1313
return (
1414
<S.GenderBtn $isActive={isActive} onClick={onClick}>
1515
<S.GenderIcon $isActive={isActive} src={gender === 'male' ? Male : Female} alt='성별' />
16-
<Typo17 weight={isActive ? '700' : '400'}>{gender === 'male' ? '남' : '여'}</Typo17>
16+
<Typo17 $weight={isActive ? '700' : '400'}>{gender === 'male' ? '남' : '여'}</Typo17>
1717
</S.GenderBtn>
1818
)
1919
}

src/components/Header/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type HeaderProps = {
1010
children?: ReactNode
1111
type: HeaderType
1212
className?: string
13+
title?: string
1314
}
1415

1516
export default function Header({
@@ -20,9 +21,11 @@ export default function Header({
2021
prevBtn,
2122
closeBtn,
2223
className,
24+
title,
2325
}: HeaderProps) {
2426
return (
2527
<S.Header className={className} $type={type}>
28+
{title ? <S.Title $weight='700'>{title}</S.Title> : null}
2629
{prevBtn ? <S.HeaderPrevBtn onClick={onClickPrev} /> : null}
2730
{closeBtn ? <S.HeaderCloseBtn onClick={onClickClose} /> : null}
2831
{children}

src/components/Header/styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import styled from 'styled-components'
22
import CloseButton from '~components/Button/CloseButton'
33
import PrevButton from '~components/Button/PrevButton'
4+
import { Typo17 } from '~components/Typo'
45
import { HEADER_HEIGHT, HEADER_HEIGHT_LG, HEADER_Z_INDEX } from '~constants/layout'
56
import { HeaderType } from '~types/headerType'
67

@@ -30,3 +31,8 @@ export const HeaderCloseBtn = styled(CloseButton)`
3031
position: absolute;
3132
right: 1.25rem;
3233
`
34+
export const Title = styled(Typo17)`
35+
position: absolute;
36+
left: 50%;
37+
translate: -50%;
38+
`

src/components/LazyComponents.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ export const LoginPage = lazy(() => import('~pages/LoginPage'))
55
export const LogPage = lazy(() => import('~pages/LogPage'))
66
export const MyPage = lazy(() => import('~pages/MyPage'))
77
export const WalkPage = lazy(() => import('~pages/WalkPage'))
8+
export const SocialPage = lazy(() => import('~pages/SocialPage'))
89
export const RegisterPage = lazy(() => import('~pages/RegisterPage/Register'))
910
export const RegisterDogPage = lazy(() => import('~pages/RegisterPage/Dog'))
11+
export const ProfilePage = lazy(() => import('~pages/ProfilePage'))

0 commit comments

Comments
 (0)