From 09fcabb9fc984f16ab8d6c76a3c45db2e6d569f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Mon, 13 Jan 2025 17:29:15 +0900 Subject: [PATCH 1/7] =?UTF-8?q?Chore:=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20?= =?UTF-8?q?=EB=8C=80=EC=86=8C=EB=AC=B8=EC=9E=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/hooks/useThemeColor.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/mobile/hooks/useThemeColor.ts b/apps/mobile/hooks/useThemeColor.ts index 486d5edb..b714afa8 100644 --- a/apps/mobile/hooks/useThemeColor.ts +++ b/apps/mobile/hooks/useThemeColor.ts @@ -3,9 +3,8 @@ * https://docs.expo.dev/guides/color-schemes/ */ -import { useColorScheme } from "react-native"; - import { COLORS } from "@/constants/colors"; +import { useColorScheme } from "react-native"; export function useThemeColor( props: { light?: string; dark?: string }, From e334f4663cbfc55387a7ffd36a27464b3129fb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Tue, 14 Jan 2025 15:33:53 +0900 Subject: [PATCH 2/7] =?UTF-8?q?Fix:=20teams=20=EA=B4=80=EB=A0=A8=20DB=20sc?= =?UTF-8?q?hema=20order=20unique=EA=B0=92=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/controllers/teamController.ts | 2 +- apps/api/src/models/teamModel.ts | 2 +- apps/mobile/hooks/useThemeColor.ts | 3 ++- apps/web/next.config.mjs | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/api/src/controllers/teamController.ts b/apps/api/src/controllers/teamController.ts index 510eec2f..7c099ee2 100644 --- a/apps/api/src/controllers/teamController.ts +++ b/apps/api/src/controllers/teamController.ts @@ -350,8 +350,8 @@ export const updateTeamOrder = async (req: UpdateTeamOrderRequest, res: Response update: { $set: { order: index } }, }, })); - await Team.bulkWrite(bulkOperations); + const reorderedTeams = await Team.find().sort({ order: 1 }).lean(); res.status(200).send({ diff --git a/apps/api/src/models/teamModel.ts b/apps/api/src/models/teamModel.ts index d1cf52d6..09dc9564 100644 --- a/apps/api/src/models/teamModel.ts +++ b/apps/api/src/models/teamModel.ts @@ -6,7 +6,7 @@ export interface TeamDocument extends Omit, Document {} const TeamSchema = new Schema( { name: { type: String, unique: true, required: true }, - order: { type: Number, unique: true, required: false }, + order: { type: Number }, }, { timestamps: true, versionKey: false }, ); diff --git a/apps/mobile/hooks/useThemeColor.ts b/apps/mobile/hooks/useThemeColor.ts index b714afa8..486d5edb 100644 --- a/apps/mobile/hooks/useThemeColor.ts +++ b/apps/mobile/hooks/useThemeColor.ts @@ -3,9 +3,10 @@ * https://docs.expo.dev/guides/color-schemes/ */ -import { COLORS } from "@/constants/colors"; import { useColorScheme } from "react-native"; +import { COLORS } from "@/constants/colors"; + export function useThemeColor( props: { light?: string; dark?: string }, colorName: keyof typeof COLORS.light & keyof typeof COLORS.dark, diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index af3caec5..1d2ef199 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -2,7 +2,6 @@ const nextConfig = { reactStrictMode: true, output: "export", - trailingSlash: true, images: { remotePatterns: [ From 79b62b23ff7d2f77ccdf59f4d62818612a8c75b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Fri, 17 Jan 2025 16:36:34 +0900 Subject: [PATCH 3/7] =?UTF-8?q?Fix:=20useWebView=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/app/_components/AuthGuard.tsx | 4 +-- apps/web/app/_hooks/useAppRouter.ts | 4 +-- apps/web/app/_hooks/useWebView.ts | 33 ++++++++++++------- .../app/dashboard/_components/EmptyState.tsx | 26 ++++++++++++--- apps/web/components/Gnb/GnbMenu.tsx | 4 +-- 5 files changed, 49 insertions(+), 22 deletions(-) diff --git a/apps/web/app/_components/AuthGuard.tsx b/apps/web/app/_components/AuthGuard.tsx index 2ecb70f4..2454d3f3 100644 --- a/apps/web/app/_components/AuthGuard.tsx +++ b/apps/web/app/_components/AuthGuard.tsx @@ -4,7 +4,7 @@ import { useEffect, useState } from "react"; import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; import { redirect, useRouter } from "next/navigation"; import { useAuthStore } from "@/app/store/useAuthStore"; -import { useWebView } from "../_hooks/useWebView"; +import { useDetectWebView } from "../_hooks/useWebView"; import SignInForm from "./SignInForm"; export default function AuthGuard(): JSX.Element | null { @@ -13,7 +13,7 @@ export default function AuthGuard(): JSX.Element | null { const { isLoggedIn } = useAuthStore(); // 웹뷰 작업 추가 - const { isWebView } = useWebView(); + const { isWebView } = useDetectWebView(); if (isWebView) redirect(PAGE_NAME.DASHBOARD); useEffect(() => { diff --git a/apps/web/app/_hooks/useAppRouter.ts b/apps/web/app/_hooks/useAppRouter.ts index 595acc23..121a3da7 100644 --- a/apps/web/app/_hooks/useAppRouter.ts +++ b/apps/web/app/_hooks/useAppRouter.ts @@ -1,14 +1,14 @@ import { useRouter } from "next/navigation"; import { WEBVIEW_MESSAGE_TYPES } from "@repo/constants"; import { sendMessageToNative } from "../utils/sendMessageToNative"; -import { useWebView } from "./useWebView"; +import { useDetectWebView } from "./useWebView"; interface UseAppRouterResult { push: (url: string) => void; } export const useAppRouter = (): UseAppRouterResult => { - const { isWebView } = useWebView(); + const { isWebView } = useDetectWebView(); const router = useRouter(); const push = (url: string): void => { diff --git a/apps/web/app/_hooks/useWebView.ts b/apps/web/app/_hooks/useWebView.ts index 6e9a4031..6dc64aa7 100644 --- a/apps/web/app/_hooks/useWebView.ts +++ b/apps/web/app/_hooks/useWebView.ts @@ -1,21 +1,32 @@ -import { useEffect, useRef } from "react"; - interface UseWebViewResult { isWebView: boolean; + isIOSWebView: boolean; + isAndroidWebView: boolean; + isIOS: boolean; + isAndroid: boolean; } -export const useWebView = (): UseWebViewResult => { - const isWebViewRef = useRef(false); +export const useDetectWebView = (): UseWebViewResult => { + const userAgent = navigator.userAgent; + + // iOS 웹뷰 감지 + const isIOS = /iPhone|iPad|iPod/.test(userAgent); + const isWebKit = userAgent.includes("AppleWebKit"); + const isSafari = userAgent.includes("Safari") || /Version\/[\d.]+.*Safari/.test(userAgent); + const isNotCriOS = !userAgent.includes("CriOS"); + const isNotFxiOS = !userAgent.includes("FxiOS"); - useEffect(() => { - if (isWebViewRef.current) return; + const isIOSWebView = isIOS && isWebKit && isNotCriOS && isNotFxiOS && !isSafari; - if (typeof window !== "undefined" && window.ReactNativeWebView) { - isWebViewRef.current = true; - } - }, []); + // Android 웹뷰 감지 + const isAndroid = userAgent.includes("Android"); + const isAndroidWebView = isAndroid && userAgent.includes("wv"); return { - isWebView: isWebViewRef.current, + isWebView: isIOSWebView || isAndroidWebView, + isIOSWebView, + isAndroidWebView, + isIOS, + isAndroid, }; }; diff --git a/apps/web/app/dashboard/_components/EmptyState.tsx b/apps/web/app/dashboard/_components/EmptyState.tsx index f627c597..4416d2a7 100644 --- a/apps/web/app/dashboard/_components/EmptyState.tsx +++ b/apps/web/app/dashboard/_components/EmptyState.tsx @@ -2,14 +2,19 @@ import { TextBalloonIcon } from "@ui/public"; import Button from "@ui/src/components/common/Button"; -import { useRouter } from "next/navigation"; +import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; +import Link from "next/link"; import { memo } from "react"; +import { useDetectWebView } from "@/app/_hooks/useWebView"; +import { useAppRouter } from "@/app/_hooks/useAppRouter"; function EmptyState(): JSX.Element { - const router = useRouter(); + const { push } = useAppRouter(); + const { isWebView } = useDetectWebView(); + console.log(isWebView); - const handleOnClick = (): void => { - router.push("/meetings"); + const handleButtonClick = (): void => { + push(PAGE_NAME.MEETINGS); }; return ( @@ -18,7 +23,18 @@ function EmptyState(): JSX.Element {

오늘 예정된 미팅이 없어요.

- diff --git a/apps/web/components/Gnb/GnbMenu.tsx b/apps/web/components/Gnb/GnbMenu.tsx index 6dec7b4e..3adb62fe 100644 --- a/apps/web/components/Gnb/GnbMenu.tsx +++ b/apps/web/components/Gnb/GnbMenu.tsx @@ -8,7 +8,7 @@ import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; import cn from "@ui/src/utils/cn"; import { Button } from "@ui/index"; import { useAppRouter } from "@/app/_hooks/useAppRouter"; -import { useWebView } from "@/app/_hooks/useWebView"; +import { useDetectWebView } from "@/app/_hooks/useWebView"; const NAV_ITEMS = [ { href: PAGE_NAME.DASHBOARD, name: "대시보드", icon: PersonIcon }, @@ -31,7 +31,7 @@ interface GnbMenuProps { export default function GnbMenu({ isAdmin }: GnbMenuProps): JSX.Element | null { const pathname = usePathname(); const { push } = useAppRouter(); - const { isWebView } = useWebView(); + const { isWebView } = useDetectWebView(); const handleButtonClick = (path: string): void => { push(path); From d5f347053db8d014a11ae363029ce70e85911a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Fri, 17 Jan 2025 17:00:05 +0900 Subject: [PATCH 4/7] =?UTF-8?q?Fix:=20useDetectWebView=20hook=20client?= =?UTF-8?q?=ED=99=98=EA=B2=BD=EC=97=90=EC=84=9C=EB=A7=8C=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/app/_components/AuthGuard.tsx | 2 +- apps/web/app/_hooks/useAppRouter.ts | 2 +- apps/web/app/_hooks/useDetectWebView.ts | 46 +++++++++++++++++++ apps/web/app/_hooks/useWebView.ts | 32 ------------- .../app/dashboard/_components/EmptyState.tsx | 3 +- apps/web/components/Gnb/GnbMenu.tsx | 2 +- 6 files changed, 50 insertions(+), 37 deletions(-) create mode 100644 apps/web/app/_hooks/useDetectWebView.ts delete mode 100644 apps/web/app/_hooks/useWebView.ts diff --git a/apps/web/app/_components/AuthGuard.tsx b/apps/web/app/_components/AuthGuard.tsx index 2454d3f3..5fed628e 100644 --- a/apps/web/app/_components/AuthGuard.tsx +++ b/apps/web/app/_components/AuthGuard.tsx @@ -4,7 +4,7 @@ import { useEffect, useState } from "react"; import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; import { redirect, useRouter } from "next/navigation"; import { useAuthStore } from "@/app/store/useAuthStore"; -import { useDetectWebView } from "../_hooks/useWebView"; +import { useDetectWebView } from "../_hooks/useDetectWebView"; import SignInForm from "./SignInForm"; export default function AuthGuard(): JSX.Element | null { diff --git a/apps/web/app/_hooks/useAppRouter.ts b/apps/web/app/_hooks/useAppRouter.ts index 121a3da7..b31a3457 100644 --- a/apps/web/app/_hooks/useAppRouter.ts +++ b/apps/web/app/_hooks/useAppRouter.ts @@ -1,7 +1,7 @@ import { useRouter } from "next/navigation"; import { WEBVIEW_MESSAGE_TYPES } from "@repo/constants"; import { sendMessageToNative } from "../utils/sendMessageToNative"; -import { useDetectWebView } from "./useWebView"; +import { useDetectWebView } from "./useDetectWebView"; interface UseAppRouterResult { push: (url: string) => void; diff --git a/apps/web/app/_hooks/useDetectWebView.ts b/apps/web/app/_hooks/useDetectWebView.ts new file mode 100644 index 00000000..ae29b855 --- /dev/null +++ b/apps/web/app/_hooks/useDetectWebView.ts @@ -0,0 +1,46 @@ +import { useEffect, useState } from "react"; + +interface UseDetectWebViewResults { + isWebView: boolean; + isIOSWebView: boolean; + isAndroidWebView: boolean; + isIOS: boolean; + isAndroid: boolean; +} + +export const useDetectWebView = (): UseDetectWebViewResults => { + const [result, setResult] = useState({ + isWebView: false, + isIOSWebView: false, + isAndroidWebView: false, + isIOS: false, + isAndroid: false, + }); + + useEffect(() => { + const userAgent = navigator.userAgent; + + // IOS 웹뷰 감지 + const isIOS = /iPhone|iPad|iPod/.test(userAgent); + const isWebKit = userAgent.includes("AppleWebKit"); + const isSafari = userAgent.includes("Safari") || /Version\/[\d.]+.*Safari/.test(userAgent); + const isNotCriOS = !userAgent.includes("CriOS"); + const isNotFxiOS = !userAgent.includes("FxiOS"); + + const isIOSWebView = isIOS && isWebKit && isNotCriOS && isNotFxiOS && !isSafari; + + // Android 웹뷰 감지 + const isAndroid = userAgent.includes("Android"); + const isAndroidWebView = isAndroid && userAgent.includes("wv"); + + setResult({ + isWebView: isIOSWebView || isAndroidWebView, + isIOSWebView, + isAndroidWebView, + isIOS, + isAndroid, + }); + }, []); + + return result; +}; diff --git a/apps/web/app/_hooks/useWebView.ts b/apps/web/app/_hooks/useWebView.ts deleted file mode 100644 index 6dc64aa7..00000000 --- a/apps/web/app/_hooks/useWebView.ts +++ /dev/null @@ -1,32 +0,0 @@ -interface UseWebViewResult { - isWebView: boolean; - isIOSWebView: boolean; - isAndroidWebView: boolean; - isIOS: boolean; - isAndroid: boolean; -} - -export const useDetectWebView = (): UseWebViewResult => { - const userAgent = navigator.userAgent; - - // iOS 웹뷰 감지 - const isIOS = /iPhone|iPad|iPod/.test(userAgent); - const isWebKit = userAgent.includes("AppleWebKit"); - const isSafari = userAgent.includes("Safari") || /Version\/[\d.]+.*Safari/.test(userAgent); - const isNotCriOS = !userAgent.includes("CriOS"); - const isNotFxiOS = !userAgent.includes("FxiOS"); - - const isIOSWebView = isIOS && isWebKit && isNotCriOS && isNotFxiOS && !isSafari; - - // Android 웹뷰 감지 - const isAndroid = userAgent.includes("Android"); - const isAndroidWebView = isAndroid && userAgent.includes("wv"); - - return { - isWebView: isIOSWebView || isAndroidWebView, - isIOSWebView, - isAndroidWebView, - isIOS, - isAndroid, - }; -}; diff --git a/apps/web/app/dashboard/_components/EmptyState.tsx b/apps/web/app/dashboard/_components/EmptyState.tsx index 4416d2a7..70f00d6e 100644 --- a/apps/web/app/dashboard/_components/EmptyState.tsx +++ b/apps/web/app/dashboard/_components/EmptyState.tsx @@ -5,13 +5,12 @@ import Button from "@ui/src/components/common/Button"; import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; import Link from "next/link"; import { memo } from "react"; -import { useDetectWebView } from "@/app/_hooks/useWebView"; +import { useDetectWebView } from "@/app/_hooks/useDetectWebView"; import { useAppRouter } from "@/app/_hooks/useAppRouter"; function EmptyState(): JSX.Element { const { push } = useAppRouter(); const { isWebView } = useDetectWebView(); - console.log(isWebView); const handleButtonClick = (): void => { push(PAGE_NAME.MEETINGS); diff --git a/apps/web/components/Gnb/GnbMenu.tsx b/apps/web/components/Gnb/GnbMenu.tsx index 3adb62fe..433d94bc 100644 --- a/apps/web/components/Gnb/GnbMenu.tsx +++ b/apps/web/components/Gnb/GnbMenu.tsx @@ -8,7 +8,7 @@ import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; import cn from "@ui/src/utils/cn"; import { Button } from "@ui/index"; import { useAppRouter } from "@/app/_hooks/useAppRouter"; -import { useDetectWebView } from "@/app/_hooks/useWebView"; +import { useDetectWebView } from "@/app/_hooks/useDetectWebView"; const NAV_ITEMS = [ { href: PAGE_NAME.DASHBOARD, name: "대시보드", icon: PersonIcon }, From 215c59980a8d66f2898edc8f14be431e8633c1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Mon, 20 Jan 2025 18:39:22 +0900 Subject: [PATCH 5/7] =?UTF-8?q?Test:=20native=20modal=20stack=20=EA=B5=AC?= =?UTF-8?q?=EC=84=B1=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/app/_layout.tsx | 2 ++ apps/mobile/app/modal.tsx | 10 ++++++++++ apps/web/app/_hooks/useAppRouter.ts | 2 ++ .../settings/_components/SettingButtons.tsx | 18 ++++++++++++++++-- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 apps/mobile/app/modal.tsx diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 9827585c..1137154d 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -35,6 +35,8 @@ export default function RootLayout() { + + ); diff --git a/apps/mobile/app/modal.tsx b/apps/mobile/app/modal.tsx new file mode 100644 index 00000000..7c88bc63 --- /dev/null +++ b/apps/mobile/app/modal.tsx @@ -0,0 +1,10 @@ +import { Link } from "expo-router"; +import { View } from "react-native"; + +export default function Modal() { + return ( + + 하이하이 난 모달 + + ); +} diff --git a/apps/web/app/_hooks/useAppRouter.ts b/apps/web/app/_hooks/useAppRouter.ts index b31a3457..923e40f9 100644 --- a/apps/web/app/_hooks/useAppRouter.ts +++ b/apps/web/app/_hooks/useAppRouter.ts @@ -12,6 +12,7 @@ export const useAppRouter = (): UseAppRouterResult => { const router = useRouter(); const push = (url: string): void => { + // web view 실행 if (isWebView) { sendMessageToNative({ type: WEBVIEW_MESSAGE_TYPES.ROUTER_EVENT, @@ -20,6 +21,7 @@ export const useAppRouter = (): UseAppRouterResult => { return; } + // web 실행 router.push(url); }; diff --git a/apps/web/app/settings/_components/SettingButtons.tsx b/apps/web/app/settings/_components/SettingButtons.tsx index c7b01529..1bf5029e 100644 --- a/apps/web/app/settings/_components/SettingButtons.tsx +++ b/apps/web/app/settings/_components/SettingButtons.tsx @@ -6,8 +6,22 @@ import { useModal } from "../_hooks/useModal"; export default function SettingButtons(): JSX.Element { const options = useUserSettingOptions(); const { isOpen, currentModal: CurrentModal, openModal, closeModal } = useModal(); + // const { isWebView } = useDetectWebView(); - const handleOpenModal = (component: ModalComponentType): void => { + const handleClick = (component: ModalComponentType): void => { + // web view 실행 data + + // web view 실행 + // if (isWebView) { + // sendMessageToNative({ + // type: "MODAL_TO_STACK", + // data: fuckWebView, + // }); + + // return; + // } + + // web 실행 openModal(component); }; @@ -20,7 +34,7 @@ export default function SettingButtons(): JSX.Element { className="text-lg-medium border-b-1 flex w-full items-center justify-between border-[#E8E8EA] px-8 py-20" type="button" onClick={() => { - handleOpenModal(component); + handleClick(component); }} > {title} From 1199a7ee86197f9af640c36d264b09af5e4c2da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Mon, 20 Jan 2025 18:57:26 +0900 Subject: [PATCH 6/7] =?UTF-8?q?Remove:=20native=20test=20component=20&=20b?= =?UTF-8?q?ridge=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/app/_layout.tsx | 2 -- apps/mobile/app/modal.tsx | 10 ---------- .../app/settings/_components/SettingButtons.tsx | 14 -------------- 3 files changed, 26 deletions(-) delete mode 100644 apps/mobile/app/modal.tsx diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 1137154d..9827585c 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -35,8 +35,6 @@ export default function RootLayout() { - - ); diff --git a/apps/mobile/app/modal.tsx b/apps/mobile/app/modal.tsx deleted file mode 100644 index 7c88bc63..00000000 --- a/apps/mobile/app/modal.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { Link } from "expo-router"; -import { View } from "react-native"; - -export default function Modal() { - return ( - - 하이하이 난 모달 - - ); -} diff --git a/apps/web/app/settings/_components/SettingButtons.tsx b/apps/web/app/settings/_components/SettingButtons.tsx index 1bf5029e..77bde4ec 100644 --- a/apps/web/app/settings/_components/SettingButtons.tsx +++ b/apps/web/app/settings/_components/SettingButtons.tsx @@ -6,22 +6,8 @@ import { useModal } from "../_hooks/useModal"; export default function SettingButtons(): JSX.Element { const options = useUserSettingOptions(); const { isOpen, currentModal: CurrentModal, openModal, closeModal } = useModal(); - // const { isWebView } = useDetectWebView(); const handleClick = (component: ModalComponentType): void => { - // web view 실행 data - - // web view 실행 - // if (isWebView) { - // sendMessageToNative({ - // type: "MODAL_TO_STACK", - // data: fuckWebView, - // }); - - // return; - // } - - // web 실행 openModal(component); }; From 1bf9e1d2a94866f27252a9f79bf3ced4f6cbdd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=87=E1=85=A9=E1=84=80?= =?UTF-8?q?=E1=85=A7=E1=86=BC?= Date: Wed, 22 Jan 2025 19:33:35 +0900 Subject: [PATCH 7/7] =?UTF-8?q?Chore:=20=EC=9B=B9=EB=B7=B0=20=EC=9E=91?= =?UTF-8?q?=EC=97=85=EC=9A=A9=20=EB=A1=9C=EC=A7=81=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/app/_components/AuthGuard.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/web/app/_components/AuthGuard.tsx b/apps/web/app/_components/AuthGuard.tsx index 5fed628e..32e62c03 100644 --- a/apps/web/app/_components/AuthGuard.tsx +++ b/apps/web/app/_components/AuthGuard.tsx @@ -2,9 +2,8 @@ import { useEffect, useState } from "react"; import { PAGE_NAME } from "@ui/src/utils/constants/pageNames"; -import { redirect, useRouter } from "next/navigation"; +import { useRouter } from "next/navigation"; import { useAuthStore } from "@/app/store/useAuthStore"; -import { useDetectWebView } from "../_hooks/useDetectWebView"; import SignInForm from "./SignInForm"; export default function AuthGuard(): JSX.Element | null { @@ -12,10 +11,6 @@ export default function AuthGuard(): JSX.Element | null { const [isLoading, setIsLoading] = useState(true); const { isLoggedIn } = useAuthStore(); - // 웹뷰 작업 추가 - const { isWebView } = useDetectWebView(); - if (isWebView) redirect(PAGE_NAME.DASHBOARD); - useEffect(() => { if (isLoggedIn) { router.replace(PAGE_NAME.DASHBOARD);