From 8c3b76ff385c41812dc052c69504112144c2026c 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: Thu, 2 Jan 2025 20:41:22 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Fix:=20nativewind=20glodal.css=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .expo/README.md | 8 ++++++++ .expo/devices.json | 3 +++ apps/mobile/app/(tabs)/index.tsx | 7 +++---- apps/mobile/app/_layout.tsx | 2 +- apps/mobile/{glodal.css => global.css} | 0 apps/mobile/metro.config.js | 21 +++++++++------------ apps/mobile/tsconfig.json | 12 +++--------- tsconfig.json | 4 ++++ 8 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 .expo/README.md create mode 100644 .expo/devices.json rename apps/mobile/{glodal.css => global.css} (100%) create mode 100644 tsconfig.json diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 00000000..f7eb5fe7 --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,8 @@ +> Why do I have a folder named ".expo" in my project? +The ".expo" folder is created when an Expo project is started using "expo start" command. +> What do the files contain? +- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds. +- "settings.json": contains the server configuration that is used to serve the application manifest. +> Should I commit the ".expo" folder? +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/.expo/devices.json b/.expo/devices.json new file mode 100644 index 00000000..5efff6c8 --- /dev/null +++ b/.expo/devices.json @@ -0,0 +1,3 @@ +{ + "devices": [] +} diff --git a/apps/mobile/app/(tabs)/index.tsx b/apps/mobile/app/(tabs)/index.tsx index fac581e6..cc224cd3 100644 --- a/apps/mobile/app/(tabs)/index.tsx +++ b/apps/mobile/app/(tabs)/index.tsx @@ -1,4 +1,3 @@ -import { Input } from "@ui/index"; import { Image, StyleSheet, Platform } from "react-native"; import { HelloWave } from "@/components/HelloWave"; @@ -13,9 +12,9 @@ export default function HomeScreen() { headerImage={} > - Welcome! -
tailwind 확인용
- + + Welcome! 테일윈드 확인용 +
diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 21788c9c..a0586e5d 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -4,9 +4,9 @@ import { Stack } from "expo-router"; import * as SplashScreen from "expo-splash-screen"; import { useEffect } from "react"; -import "react-native-reanimated"; import { useColorScheme } from "@/hooks/useColorScheme"; +import "react-native-reanimated"; import "../global.css"; // Prevent the splash screen from auto-hiding before asset loading is complete. diff --git a/apps/mobile/glodal.css b/apps/mobile/global.css similarity index 100% rename from apps/mobile/glodal.css rename to apps/mobile/global.css diff --git a/apps/mobile/metro.config.js b/apps/mobile/metro.config.js index 4e56bbde..ef382e14 100644 --- a/apps/mobile/metro.config.js +++ b/apps/mobile/metro.config.js @@ -5,20 +5,17 @@ const path = require("path"); const projectRoot = __dirname; const monorepoRoot = path.resolve(projectRoot, "../.."); -/** @type {import('expo/metro-config').MetroConfig} */ -const config = getDefaultConfig(projectRoot); +const config = getDefaultConfig(__dirname, { isCSSEnabled: true }); -// const monorepoPackages = { -// "@repo/ui": path.resolve(monorepoRoot, "packages/ui"), -// "@repo/types": path.resolve(monorepoRoot, "packages/types"), -// "@repo/constants": path.resolve(monorepoRoot, "packages/constants"), -// "@repo/eslint-config": path.resolve(monorepoRoot, "packages/eslint-config"), -// }; - -// config.resolver.extraNodeModules = monorepoPackages; -// config.watchFolders = [monorepoRoot, ...Object.values(monorepoPackages)]; -config.watchFolders = [monorepoRoot]; +const monorepoPackages = { + // "@repo/ui": path.resolve(monorepoRoot, "packages/ui"), + // "@repo/types": path.resolve(monorepoRoot, "packages/types"), + // "@repo/constants": path.resolve(monorepoRoot, "packages/constants"), + // "@repo/eslint-config": path.resolve(monorepoRoot, "packages/eslint-config"), +}; +config.watchFolders = [monorepoRoot, ...Object.values(monorepoPackages)]; +config.resolver.extraNodeModules = monorepoPackages; config.resolver.nodeModulesPaths = [ path.resolve(projectRoot, "node_modules"), path.resolve(monorepoRoot, "node_modules"), diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.json index 5731d6ad..741b67ab 100644 --- a/apps/mobile/tsconfig.json +++ b/apps/mobile/tsconfig.json @@ -4,15 +4,9 @@ "strict": true, "baseUrl": ".", "paths": { - "@/*": [ - "./*" - ], - "@ui/*": [ - "../../packages/ui/*" - ], - "@/public/*": [ - "./public/*" - ] + "@/*": ["./*"], + "@ui/*": ["../../packages/ui/*"], + "@/public/*": ["./public/*"] } }, "include": [ diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..0e6371f6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,4 @@ +{ + "compilerOptions": {}, + "extends": "expo/tsconfig.base" +} From f60e99c42d0c54708f3fad19f0eedf459ad7eda7 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: Thu, 2 Jan 2025 20:46:43 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Setting:=20nativewind=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=97=B0=EB=8F=99=20extend=20packages/tailwind-config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/app/(tabs)/index.tsx | 2 +- apps/mobile/tailwind.config.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/mobile/app/(tabs)/index.tsx b/apps/mobile/app/(tabs)/index.tsx index cc224cd3..33d5760d 100644 --- a/apps/mobile/app/(tabs)/index.tsx +++ b/apps/mobile/app/(tabs)/index.tsx @@ -12,7 +12,7 @@ export default function HomeScreen() { headerImage={} > - + Welcome! 테일윈드 확인용 diff --git a/apps/mobile/tailwind.config.js b/apps/mobile/tailwind.config.js index 21273693..2f9989a6 100644 --- a/apps/mobile/tailwind.config.js +++ b/apps/mobile/tailwind.config.js @@ -1,8 +1,14 @@ +import sharedConfig from "@repo/tailwind-config/tailwind.config"; + /** @type {import('tailwindcss').Config} */ module.exports = { - // NOTE: Update this to include the paths to all of your component files. - content: ["./app/**/*.{js,jsx,ts,tsx}"], - presets: [require("nativewind/preset")], + content: [ + "./src/**/*.{js,ts,jsx,tsx}", + "./app/**/*.{js,ts,jsx,tsx}", + "../../packages/ui/src/**/*.{ts,tsx}", + "./components/**/*.{js,ts,jsx,tsx}", + ], + presets: [require("nativewind/preset"), sharedConfig], theme: { extend: {}, }, From d9b646193d5567263d9424bc27c18ca49e2da5f4 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: Thu, 2 Jan 2025 20:50:48 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Fix:=20ErrorBoundary=20query=20remove=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/ErrorResetBoundary/index.tsx | 11 +---------- apps/web/components/common/Fallback/index.tsx | 4 ++++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/web/components/common/ErrorResetBoundary/index.tsx b/apps/web/components/common/ErrorResetBoundary/index.tsx index 83e5785e..7d7a25a2 100644 --- a/apps/web/components/common/ErrorResetBoundary/index.tsx +++ b/apps/web/components/common/ErrorResetBoundary/index.tsx @@ -1,7 +1,6 @@ "use client"; import { type ReactNode, type ComponentType } from "react"; -import { QueryErrorResetBoundary } from "@tanstack/react-query"; import { ErrorBoundary, type FallbackProps } from "react-error-boundary"; interface ErrorResetBoundaryProps { @@ -13,13 +12,5 @@ export default function ErrorResetBoundary({ children, fallbackComponent: FallbackComponent, }: ErrorResetBoundaryProps): JSX.Element { - return ( - - {({ reset }) => ( - - {children} - - )} - - ); + return {children}; } diff --git a/apps/web/components/common/Fallback/index.tsx b/apps/web/components/common/Fallback/index.tsx index 1e905378..5d830a4b 100644 --- a/apps/web/components/common/Fallback/index.tsx +++ b/apps/web/components/common/Fallback/index.tsx @@ -1,6 +1,7 @@ "use client"; import { Button } from "@ui/index"; +import { getQueryClient } from "@/lib/queryClient"; interface ErrorFallbackProps { error: Error; @@ -8,7 +9,10 @@ interface ErrorFallbackProps { } export default function ErrorFallback({ error, resetErrorBoundary }: ErrorFallbackProps): JSX.Element { + const queryClient = getQueryClient(); + const handleResetErrorBoundary = (): void => { + queryClient.removeQueries(); resetErrorBoundary(); }; From c1cdc6bd25852320b8cfd8ff2f0636545eb6b1d3 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: Thu, 2 Jan 2025 21:04:20 +0900 Subject: [PATCH 4/4] =?UTF-8?q?Chore:=20root=20tsconfig=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 tsconfig.json diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 0e6371f6..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "compilerOptions": {}, - "extends": "expo/tsconfig.base" -}