From 4f8fa92d25a4dc33fb3174dd2221ed3042400f18 Mon Sep 17 00:00:00 2001 From: dgfh0450 Date: Tue, 4 Feb 2025 10:28:47 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[UNI-95]=20feat=20:=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EA=B2=B0=EA=B3=BC=20=EC=97=86=EC=9D=8C=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/error/search-null.svg | 5 +++ .../src/components/error/SearchNull.tsx | 13 +++++++ uniro_frontend/src/pages/demo.tsx | 35 +++++++++++-------- 3 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 uniro_frontend/src/assets/error/search-null.svg create mode 100644 uniro_frontend/src/components/error/SearchNull.tsx diff --git a/uniro_frontend/src/assets/error/search-null.svg b/uniro_frontend/src/assets/error/search-null.svg new file mode 100644 index 0000000..2d8aa38 --- /dev/null +++ b/uniro_frontend/src/assets/error/search-null.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/uniro_frontend/src/components/error/SearchNull.tsx b/uniro_frontend/src/components/error/SearchNull.tsx new file mode 100644 index 0000000..8c8b090 --- /dev/null +++ b/uniro_frontend/src/components/error/SearchNull.tsx @@ -0,0 +1,13 @@ +import NullIcon from "../../assets/error/search-null.svg?react"; + +export default function SearchNull({ message }: { message: string }) { + return ( +
+ +
+

검색 결과가 없습니다.

+

{message}

+
+
+ ) +} diff --git a/uniro_frontend/src/pages/demo.tsx b/uniro_frontend/src/pages/demo.tsx index 2ee40b0..1533dd4 100644 --- a/uniro_frontend/src/pages/demo.tsx +++ b/uniro_frontend/src/pages/demo.tsx @@ -11,6 +11,7 @@ import ReportButton from "../components/map/reportButton"; import { CautionToggleButton, DangerToggleButton } from "../components/map/floatingButtons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { getFetch, postFetch, putFetch } from "../utils/fetch/fetch"; +import SearchNull from "../components/error/SearchNull"; const getTest = () => { /** https://jsonplaceholder.typicode.com/comments?postId=1 */ @@ -51,8 +52,8 @@ export default function Demo() { return ( <> -
-
+
+
-
+
{ }} isActive={false} /> @@ -75,7 +76,7 @@ export default function Demo() {
-
+
{ }} @@ -96,14 +97,6 @@ export default function Demo() {
-
- - -

불편한 길 제보가 완료되었습니다!

@@ -122,9 +115,21 @@ export default function Demo() {

다른 건물을 시도해주세요.

-
-
- +
+ +
+
+ + +
+ + +
+

Click on the Vite and React logos to learn more

From 52fae0c7ca827e13bb405404907e97a3f7f72561 Mon Sep 17 00:00:00 2001 From: dgfh0450 Date: Tue, 4 Feb 2025 11:12:01 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[UNI-95]=20feat=20:=20=EC=98=A4=ED=94=84?= =?UTF-8?q?=EB=9D=BC=EC=9D=B8=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uniro_frontend/src/assets/error/offline.svg | 4 ++++ uniro_frontend/src/components/error/Offline.tsx | 13 +++++++++++++ uniro_frontend/src/pages/demo.tsx | 6 +++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 uniro_frontend/src/assets/error/offline.svg create mode 100644 uniro_frontend/src/components/error/Offline.tsx diff --git a/uniro_frontend/src/assets/error/offline.svg b/uniro_frontend/src/assets/error/offline.svg new file mode 100644 index 0000000..d21a411 --- /dev/null +++ b/uniro_frontend/src/assets/error/offline.svg @@ -0,0 +1,4 @@ + + + + diff --git a/uniro_frontend/src/components/error/Offline.tsx b/uniro_frontend/src/components/error/Offline.tsx new file mode 100644 index 0000000..0972949 --- /dev/null +++ b/uniro_frontend/src/components/error/Offline.tsx @@ -0,0 +1,13 @@ +import OfflineIcon from "../../assets/error/offline.svg?react"; + +export default function Offline() { + return ( +
+ +
+

오프라인 상태입니다.

+

네트워크에 연결됐는지 확인해 주세요.

+
+
+ ) +} diff --git a/uniro_frontend/src/pages/demo.tsx b/uniro_frontend/src/pages/demo.tsx index 1533dd4..e28c9bd 100644 --- a/uniro_frontend/src/pages/demo.tsx +++ b/uniro_frontend/src/pages/demo.tsx @@ -12,6 +12,7 @@ import { CautionToggleButton, DangerToggleButton } from "../components/map/float import { useMutation, useQuery } from "@tanstack/react-query"; import { getFetch, postFetch, putFetch } from "../utils/fetch/fetch"; import SearchNull from "../components/error/SearchNull"; +import Offline from "../components/error/Offline"; const getTest = () => { /** https://jsonplaceholder.typicode.com/comments?postId=1 */ @@ -118,7 +119,7 @@ export default function Demo() {
-
+
@@ -129,6 +130,9 @@ export default function Demo() {
+
+ +

Click on the Vite and React logos to learn more

From d3ab3e08973474526625382996f284516bc9a140 Mon Sep 17 00:00:00 2001 From: dgfh0450 Date: Tue, 4 Feb 2025 11:12:33 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[UNI-95]=20feat=20:=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uniro_frontend/src/assets/error/error.svg | 3 +++ uniro_frontend/src/components/error/Error.tsx | 13 +++++++++++++ uniro_frontend/src/pages/demo.tsx | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 uniro_frontend/src/assets/error/error.svg create mode 100644 uniro_frontend/src/components/error/Error.tsx diff --git a/uniro_frontend/src/assets/error/error.svg b/uniro_frontend/src/assets/error/error.svg new file mode 100644 index 0000000..57cbfe9 --- /dev/null +++ b/uniro_frontend/src/assets/error/error.svg @@ -0,0 +1,3 @@ + + + diff --git a/uniro_frontend/src/components/error/Error.tsx b/uniro_frontend/src/components/error/Error.tsx new file mode 100644 index 0000000..9aaacd4 --- /dev/null +++ b/uniro_frontend/src/components/error/Error.tsx @@ -0,0 +1,13 @@ +import ErrorIcon from "../../assets/error/error.svg?react"; + +export default function Error() { + return ( +
+ +
+

일시적인 오류로
데이터를 불러올 수 없습니다.

+

잠시 후 다시 시도해 주세요.

+
+
+ ) +} diff --git a/uniro_frontend/src/pages/demo.tsx b/uniro_frontend/src/pages/demo.tsx index e28c9bd..d4455a9 100644 --- a/uniro_frontend/src/pages/demo.tsx +++ b/uniro_frontend/src/pages/demo.tsx @@ -13,6 +13,7 @@ import { useMutation, useQuery } from "@tanstack/react-query"; import { getFetch, postFetch, putFetch } from "../utils/fetch/fetch"; import SearchNull from "../components/error/SearchNull"; import Offline from "../components/error/Offline"; +import Error from "../components/error/Error"; const getTest = () => { /** https://jsonplaceholder.typicode.com/comments?postId=1 */ @@ -130,8 +131,9 @@ export default function Demo() {
-
+
+
From 8998d2b88aaa744fc9aa94520143434011b3b6cc Mon Sep 17 00:00:00 2001 From: dgfh0450 Date: Tue, 4 Feb 2025 11:51:56 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[UNI-95]=20chore=20:=20Lint=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uniro_frontend/src/App.tsx | 4 ++-- uniro_frontend/src/components/error/Error.tsx | 20 ++++++++++--------- .../src/components/error/Offline.tsx | 18 ++++++++--------- .../src/components/error/SearchNull.tsx | 18 ++++++++--------- uniro_frontend/src/pages/demo.tsx | 14 ++++++------- 5 files changed, 38 insertions(+), 36 deletions(-) diff --git a/uniro_frontend/src/App.tsx b/uniro_frontend/src/App.tsx index b3066ba..d1b21e6 100644 --- a/uniro_frontend/src/App.tsx +++ b/uniro_frontend/src/App.tsx @@ -24,8 +24,8 @@ function App() { } /> } /> } /> - } /> - } /> + } /> + } /> ); diff --git a/uniro_frontend/src/components/error/Error.tsx b/uniro_frontend/src/components/error/Error.tsx index 9aaacd4..d2dfb1b 100644 --- a/uniro_frontend/src/components/error/Error.tsx +++ b/uniro_frontend/src/components/error/Error.tsx @@ -1,13 +1,15 @@ import ErrorIcon from "../../assets/error/error.svg?react"; export default function Error() { - return ( -
- -
-

일시적인 오류로
데이터를 불러올 수 없습니다.

-

잠시 후 다시 시도해 주세요.

-
-
- ) + return ( +
+ +
+

+ 일시적인 오류로
데이터를 불러올 수 없습니다. +

+

잠시 후 다시 시도해 주세요.

+
+
+ ); } diff --git a/uniro_frontend/src/components/error/Offline.tsx b/uniro_frontend/src/components/error/Offline.tsx index 0972949..e48ec8a 100644 --- a/uniro_frontend/src/components/error/Offline.tsx +++ b/uniro_frontend/src/components/error/Offline.tsx @@ -1,13 +1,13 @@ import OfflineIcon from "../../assets/error/offline.svg?react"; export default function Offline() { - return ( -
- -
-

오프라인 상태입니다.

-

네트워크에 연결됐는지 확인해 주세요.

-
-
- ) + return ( +
+ +
+

오프라인 상태입니다.

+

네트워크에 연결됐는지 확인해 주세요.

+
+
+ ); } diff --git a/uniro_frontend/src/components/error/SearchNull.tsx b/uniro_frontend/src/components/error/SearchNull.tsx index 8c8b090..fbf5772 100644 --- a/uniro_frontend/src/components/error/SearchNull.tsx +++ b/uniro_frontend/src/components/error/SearchNull.tsx @@ -1,13 +1,13 @@ import NullIcon from "../../assets/error/search-null.svg?react"; export default function SearchNull({ message }: { message: string }) { - return ( -
- -
-

검색 결과가 없습니다.

-

{message}

-
-
- ) + return ( +
+ +
+

검색 결과가 없습니다.

+

{message}

+
+
+ ); } diff --git a/uniro_frontend/src/pages/demo.tsx b/uniro_frontend/src/pages/demo.tsx index d4455a9..0113732 100644 --- a/uniro_frontend/src/pages/demo.tsx +++ b/uniro_frontend/src/pages/demo.tsx @@ -68,30 +68,30 @@ export default function Demo() {
- { }} isActive={false} /> - { }} isActive={true} /> + {}} isActive={false} /> + {}} isActive={true} />
- { }} isActive={false} /> - { }} isActive={true} /> + {}} isActive={false} /> + {}} isActive={true} />
{ }} + handleVoiceInput={() => {}} onLengthChange={(e: string) => { console.log(e); }} /> - { }} placeholder="출발지를 입력하세요"> + {}} placeholder="출발지를 입력하세요"> { }} + onClick={() => {}} placeholder="도착지를 입력하세요" value={destination} onCancel={() => setDestination("")}