From 340a138f18d46bd6156bfc3465877e87d143dc3c Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 16:42:39 +0900
Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=90=9BFix:=20Footer=20PageLoader=20?=
=?UTF-8?q?=EC=98=81=ED=96=A5=20X?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.tsx | 7 ++-----
src/components/Footer/styles.ts | 1 +
src/router.tsx | 6 +++++-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/App.tsx b/src/App.tsx
index d503728..8904cca 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,6 +1,6 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
-import { Suspense, useState } from 'react'
+import { useState } from 'react'
import { Helmet, HelmetProvider } from 'react-helmet-async'
import { RouterProvider } from 'react-router-dom'
import styled, { ThemeProvider } from 'styled-components'
@@ -8,7 +8,6 @@ import PWABadge from '~/PWABadge'
import { router } from '~/router'
import GlobalStyle from '~/styles/globalStyle'
import { darkTheme, lightTheme } from '~/styles/theme'
-import PageLoader from '~components/PageLoader'
import PushNotification from '~components/PushNotification'
const queryClient = new QueryClient()
@@ -31,9 +30,7 @@ function App() {
- }>
-
-
+
diff --git a/src/components/Footer/styles.ts b/src/components/Footer/styles.ts
index b922fa1..03dc593 100644
--- a/src/components/Footer/styles.ts
+++ b/src/components/Footer/styles.ts
@@ -10,6 +10,7 @@ export const Footer = styled.footer`
bottom: 0;
background-color: ${({ theme }) => theme.colors.grayscale.gc_4};
box-shadow: inset 0 1px 0 0 ${({ theme }) => theme.colors.grayscale.gc_1};
+ z-index: 1000;
`
export const FooterNavList = styled.ul`
diff --git a/src/router.tsx b/src/router.tsx
index d2252e6..fd77d50 100644
--- a/src/router.tsx
+++ b/src/router.tsx
@@ -4,6 +4,8 @@ import Footer from '~components/Footer'
import ModalContainer from '~modals/ModalContainer'
import * as Pages from './components/LazyComponents'
import GlobalHookContainer from '~components/GlobalHookContainer'
+import { Suspense } from 'react'
+import PageLoader from '~components/PageLoader'
export const router = createBrowserRouter([
{
@@ -11,7 +13,9 @@ export const router = createBrowserRouter([
element: (
-
+ }>
+
+
From 7d97a704f30b289e51168078d4b72e930f531bcf Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 16:44:07 +0900
Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=90=9BFix:=20Logout=20=EC=8B=9C=20Sus?=
=?UTF-8?q?pense=20=EC=97=90=EB=9F=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router.tsx | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/router.tsx b/src/router.tsx
index fd77d50..4e3b45f 100644
--- a/src/router.tsx
+++ b/src/router.tsx
@@ -1,11 +1,11 @@
+import { Suspense } from 'react'
import { createBrowserRouter, Outlet } from 'react-router-dom'
import { WebSocketProvider } from '~/WebSocketContext'
import Footer from '~components/Footer'
-import ModalContainer from '~modals/ModalContainer'
-import * as Pages from './components/LazyComponents'
import GlobalHookContainer from '~components/GlobalHookContainer'
-import { Suspense } from 'react'
import PageLoader from '~components/PageLoader'
+import ModalContainer from '~modals/ModalContainer'
+import * as Pages from './components/LazyComponents'
export const router = createBrowserRouter([
{
@@ -63,28 +63,28 @@ export const router = createBrowserRouter([
{
path: '/login',
element: (
- <>
+ }>
- >
+
),
},
{
path: '/register',
element: (
- <>
+ }>
- >
+
),
},
{
path: '/register/dog',
element: (
- <>
+ }>
- >
+
),
},
])
From 014633ec4e1edb443c5e7afa6dce828901cbfba1 Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 17:05:55 +0900
Subject: [PATCH 3/8] =?UTF-8?q?=E2=9C=A8Feat:=20"=EB=9E=91"=20"=EC=9D=B4?=
=?UTF-8?q?=EB=9E=91"=20=EA=B5=AC=EB=B6=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/HomePage/index.tsx | 3 ++-
src/utils/appendParticle.ts | 14 ++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 src/utils/appendParticle.ts
diff --git a/src/pages/HomePage/index.tsx b/src/pages/HomePage/index.tsx
index 460c49e..0b3da67 100644
--- a/src/pages/HomePage/index.tsx
+++ b/src/pages/HomePage/index.tsx
@@ -18,6 +18,7 @@ import { FAMILY_ROLE } from '~constants/familyRole'
import NotificationModal from '~modals/NotificationModal'
import { useModalStore } from '~stores/modalStore'
import * as S from './styles'
+import { appendParticle } from '~utils/appendParticle'
function HomeContent() {
const {
@@ -40,7 +41,7 @@ function HomeContent() {
- 오늘은 {data?.familyRole ? FAMILY_ROLE[data.familyRole] : ''}랑
+ 오늘은 {appendParticle(FAMILY_ROLE[data?.familyRole])}
산책가는 날!
diff --git a/src/utils/appendParticle.ts b/src/utils/appendParticle.ts
new file mode 100644
index 0000000..069de83
--- /dev/null
+++ b/src/utils/appendParticle.ts
@@ -0,0 +1,14 @@
+export function appendParticle(word: string) {
+ const lastChar = word.charAt(word.length - 1)
+ const unicodeValue = lastChar.charCodeAt(0)
+
+ // 한글 유니코드 범위 체크
+ if (unicodeValue < 0xac00 || unicodeValue > 0xd7a3) {
+ return word + '랑'
+ }
+
+ // 종성 확인
+ const hasConsonantJongseong = (unicodeValue - 0xac00) % 28 > 0
+
+ return word + (hasConsonantJongseong ? '이랑' : '랑')
+}
From e1dc564cc2edf7f3574d638b2a9799714b4c01ca Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 17:19:15 +0900
Subject: [PATCH 4/8] =?UTF-8?q?=E2=9C=A8Feat:=20=ED=99=88=ED=8E=98?=
=?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EA=B0=80=EC=A1=B1=20=EC=97=AD=ED=95=A0?=
=?UTF-8?q?=EC=97=90=20=EC=BB=AC=EB=9F=AC=EC=A0=81=EC=9A=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/HomePage/index.tsx | 8 ++++++--
src/utils/{appendParticle.ts => getParticle.ts} | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
rename src/utils/{appendParticle.ts => getParticle.ts} (63%)
diff --git a/src/pages/HomePage/index.tsx b/src/pages/HomePage/index.tsx
index 0b3da67..ea5cafe 100644
--- a/src/pages/HomePage/index.tsx
+++ b/src/pages/HomePage/index.tsx
@@ -18,7 +18,7 @@ import { FAMILY_ROLE } from '~constants/familyRole'
import NotificationModal from '~modals/NotificationModal'
import { useModalStore } from '~stores/modalStore'
import * as S from './styles'
-import { appendParticle } from '~utils/appendParticle'
+import { getParticle } from '~utils/getParticle'
function HomeContent() {
const {
@@ -41,7 +41,11 @@ function HomeContent() {
- 오늘은 {appendParticle(FAMILY_ROLE[data?.familyRole])}
+ 오늘은{' '}
+
+ {FAMILY_ROLE[data?.familyRole]}
+
+ {getParticle(FAMILY_ROLE[data?.familyRole])}
산책가는 날!
diff --git a/src/utils/appendParticle.ts b/src/utils/getParticle.ts
similarity index 63%
rename from src/utils/appendParticle.ts
rename to src/utils/getParticle.ts
index 069de83..fdb2580 100644
--- a/src/utils/appendParticle.ts
+++ b/src/utils/getParticle.ts
@@ -1,4 +1,8 @@
-export function appendParticle(word: string) {
+/**
+ * word에 받침이 있으면 "이랑"
+ * 받침이 없으면 "랑" 반환
+ */
+export function getParticle(word: string) {
const lastChar = word.charAt(word.length - 1)
const unicodeValue = lastChar.charCodeAt(0)
@@ -10,5 +14,5 @@ export function appendParticle(word: string) {
// 종성 확인
const hasConsonantJongseong = (unicodeValue - 0xac00) % 28 > 0
- return word + (hasConsonantJongseong ? '이랑' : '랑')
+ return hasConsonantJongseong ? '이랑' : '랑'
}
From f89a88d5abf81ccc4d09341d46b90e40c9428c77 Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:03:57 +0900
Subject: [PATCH 5/8] =?UTF-8?q?=E2=9C=A8Feat:=20clearModal?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/GlobalHookContainer/index.tsx | 2 ++
src/hooks/useClearModal.ts | 11 +++++++++++
src/modals/ChatArea/styles.ts | 12 ++++++++++++
src/modals/ChatModal/styles.ts | 12 +-----------
4 files changed, 26 insertions(+), 11 deletions(-)
create mode 100644 src/hooks/useClearModal.ts
diff --git a/src/components/GlobalHookContainer/index.tsx b/src/components/GlobalHookContainer/index.tsx
index 57e66ca..665ff93 100644
--- a/src/components/GlobalHookContainer/index.tsx
+++ b/src/components/GlobalHookContainer/index.tsx
@@ -1,9 +1,11 @@
import { ReactNode } from 'react'
+import useClearModal from '~hooks/useClearModal'
import useSubscribe from '~hooks/useSubscribe'
import useToken from '~hooks/useToken'
export default function GlobalHookContainer({ children }: { children: ReactNode }) {
useToken()
useSubscribe()
+ useClearModal()
return <>{children}>
}
diff --git a/src/hooks/useClearModal.ts b/src/hooks/useClearModal.ts
new file mode 100644
index 0000000..14b7172
--- /dev/null
+++ b/src/hooks/useClearModal.ts
@@ -0,0 +1,11 @@
+import { useEffect } from 'react'
+import { useLocation } from 'react-router-dom'
+import { useModalStore } from '~stores/modalStore'
+
+export default function useClearModal() {
+ const { pathname } = useLocation()
+ const { clearModal } = useModalStore()
+ useEffect(() => {
+ clearModal()
+ }, [pathname])
+}
diff --git a/src/modals/ChatArea/styles.ts b/src/modals/ChatArea/styles.ts
index c974fd1..db4b004 100644
--- a/src/modals/ChatArea/styles.ts
+++ b/src/modals/ChatArea/styles.ts
@@ -1,7 +1,19 @@
import { styled } from 'styled-components'
+import DogHowling from '~assets/dog_howling.svg'
export const ChatArea = styled.div`
+ position: relative;
height: calc(100% - 64px);
overflow: auto;
+ &::after {
+ background: url(${DogHowling}) center/cover;
+ content: '';
+ width: 190px;
+ height: 260px;
+ position: fixed;
+ bottom: 95px;
+ left: 50%;
+ translate: -50%;
+ }
`
export const ChatMessageList = styled.div``
diff --git a/src/modals/ChatModal/styles.ts b/src/modals/ChatModal/styles.ts
index 213b492..aa6cd57 100644
--- a/src/modals/ChatModal/styles.ts
+++ b/src/modals/ChatModal/styles.ts
@@ -1,6 +1,5 @@
import { styled } from 'styled-components'
import { HEADER_HEIGHT_LG } from '~constants/layout'
-import DogHowling from '~assets/dog_howling.svg'
export const ChatModal = styled.div`
position: relative;
@@ -8,17 +7,8 @@ export const ChatModal = styled.div`
height: 100%;
padding: ${HEADER_HEIGHT_LG}px 20px 0;
background-color: ${({ theme }) => theme.colors.brand.lighten_3};
- &::after {
- background: url(${DogHowling}) center/cover;
- content: '';
- width: 190px;
- height: 260px;
- position: fixed;
- bottom: 95px;
- left: 50%;
- translate: -50%;
- }
`
+
export const ProfileWrapper = styled.div`
display: flex;
align-items: center;
From 2f8a955d2984e28356a6d42bd5c273bf7550dd91 Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:09:35 +0900
Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=90=9BFix:=20WalkAnalysisModal?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modals/WalkAnalysisModal/index.tsx | 62 +++++++++++---------------
src/pages/LogPage/index.tsx | 15 ++++++-
2 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/src/modals/WalkAnalysisModal/index.tsx b/src/modals/WalkAnalysisModal/index.tsx
index ae65574..7b02e08 100644
--- a/src/modals/WalkAnalysisModal/index.tsx
+++ b/src/modals/WalkAnalysisModal/index.tsx
@@ -1,15 +1,11 @@
-import { useEffect, useRef, Suspense } from 'react'
+import { useEffect, useRef } from 'react'
+import { FamilyMemberWalk } from '~apis/log/fetchFamilyYearlyWalks'
import Prev from '~assets/prev.svg'
+import { useCurrentMonthWalks, useFamilyWalks, useMonthlyWalks, useTotalWalks } from '~pages/LogPage/useWalkInfo'
import { useModalStore } from '~stores/modalStore'
+import Statistics from './components/Statistics'
import { createBarChart, createLineChart } from './createChart'
import * as S from './styles'
-import { FamilyMemberWalk } from '~apis/log/fetchFamilyYearlyWalks'
-import Statistics from './components/Statistics'
-import { useCurrentMonthWalks, useFamilyWalks, useMonthlyWalks, useTotalWalks } from '~pages/LogPage/useWalkInfo'
-import { QueryErrorResetBoundary } from '@tanstack/react-query'
-import { ErrorBoundary } from 'react-error-boundary'
-import ErrorFallback from '~components/ErrorFallback'
-import PageLoader from '~components/PageLoader'
interface ChartData {
month: string
@@ -55,33 +51,27 @@ export default function WalkAnalysisModal() {
}
}, [monthlyWalks, familyWalks])
return (
-
- {({ reset }) => (
-
- }>
-
-
- 산책 분석
-
-
-
-
- 올해 월 별 산책기록
-
-
-
- 올해 가족별 산책 횟수
-
-
-
-
-
-
-
-
-
-
- )}
-
+ <>
+
+
+ 산책 분석
+
+
+
+
+ 올해 월 별 산책기록
+
+
+
+ 올해 가족별 산책 횟수
+
+
+
+
+
+
+
+
+ >
)
}
diff --git a/src/pages/LogPage/index.tsx b/src/pages/LogPage/index.tsx
index 8f1aba1..3787410 100644
--- a/src/pages/LogPage/index.tsx
+++ b/src/pages/LogPage/index.tsx
@@ -35,7 +35,20 @@ export default function LogPage() {
pushModal(, 'slideLeft')}
+ onClick={() =>
+ pushModal(
+
+ {({ reset }) => (
+
+ }>
+
+
+
+ )}
+ ,
+ 'slideLeft'
+ )
+ }
/>
From 4810d3fb0e6e4debe24a00d86fa4f45f5ee4c66d Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:34:51 +0900
Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=90=9BFix:=20=EC=B1=84=ED=8C=85=20?=
=?UTF-8?q?=EC=9E=85=EB=A0=A5=EC=B0=BD=20=EC=95=88=EB=B3=B4=EC=9D=B4?=
=?UTF-8?q?=EB=8A=94=20=EB=B2=84=EA=B7=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Footer/styles.ts | 2 +-
src/components/SendMessageForm/styles.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/Footer/styles.ts b/src/components/Footer/styles.ts
index 03dc593..3d96a0b 100644
--- a/src/components/Footer/styles.ts
+++ b/src/components/Footer/styles.ts
@@ -10,7 +10,7 @@ export const Footer = styled.footer`
bottom: 0;
background-color: ${({ theme }) => theme.colors.grayscale.gc_4};
box-shadow: inset 0 1px 0 0 ${({ theme }) => theme.colors.grayscale.gc_1};
- z-index: 1000;
+ z-index: 900;
`
export const FooterNavList = styled.ul`
diff --git a/src/components/SendMessageForm/styles.ts b/src/components/SendMessageForm/styles.ts
index 450b0fa..9d17204 100644
--- a/src/components/SendMessageForm/styles.ts
+++ b/src/components/SendMessageForm/styles.ts
@@ -11,7 +11,7 @@ export const SendMessageForm = styled.form`
display: flex;
align-items: center;
gap: 12px;
- z-index: 1;
+ z-index: 1000;
`
export const ChatInput = styled.input`
flex: 1;
From 2a64959ad90a13957c69037b30c1263cf341ef49 Mon Sep 17 00:00:00 2001
From: shlee9999 <95556588+shlee9999@users.noreply.github.com>
Date: Mon, 9 Dec 2024 18:56:13 +0900
Subject: [PATCH 8/8] =?UTF-8?q?=E2=9C=A8Feat:=20=EB=A1=9C=EA=B7=B8?=
=?UTF-8?q?=EC=9D=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A1=9C=EA=B3=A0=20?=
=?UTF-8?q?=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/favicon.svg | 13 +++++++++++++
src/pages/LoginPage/index.tsx | 6 ++++--
2 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 src/assets/favicon.svg
diff --git a/src/assets/favicon.svg b/src/assets/favicon.svg
new file mode 100644
index 0000000..dfef3a3
--- /dev/null
+++ b/src/assets/favicon.svg
@@ -0,0 +1,13 @@
+
diff --git a/src/pages/LoginPage/index.tsx b/src/pages/LoginPage/index.tsx
index 2f27cca..2991fab 100644
--- a/src/pages/LoginPage/index.tsx
+++ b/src/pages/LoginPage/index.tsx
@@ -1,6 +1,6 @@
import * as S from './styles'
import { Helmet } from 'react-helmet-async'
-
+import Logo from '~assets/favicon.svg?react'
const serverUrl = import.meta.env.VITE_SERVER_URL
const BACK_URL = new URL(serverUrl).origin
@@ -56,7 +56,9 @@ export default function LoginPage() {
- 로고
+
+
+
)