From 8d52e0b8793804f268b01d11493c4713c5eec4a9 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 01:58:58 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=F0=9F=92=85=20style:=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=ED=81=AC=EA=B8=B0=20=EB=8B=A8=EC=9C=84=20=EA=B0=92?= =?UTF-8?q?=20tailwind.config.ts=EC=97=90=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tailwind.config.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tailwind.config.ts b/tailwind.config.ts index 31d9e2b..a7a236f 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -6,13 +6,20 @@ const config: Config = { "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", "./src/components/**/*.{js,ts,jsx,tsx,mdx}", "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + "./src/layout/*.{js,ts,jsx,tsx,mdx}", + "./src/layout/**/*.{js,ts,jsx,tsx,mdx}", ], theme: { + screens: { + "m-sm": "320px", + "m-md": "375px", + "m-lg": "450px", + }, extend: { - backgroundImage: { - "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", - "gradient-conic": - "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", + minWidth: { + "m-sm": "320px", + "m-md": "375px", + "m-lg": "450px", }, }, }, From e3743171f13521d33a7c5c2a92574cd80ccfe400 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:00:00 +0900 Subject: [PATCH 02/14] =?UTF-8?q?=F0=9F=94=A7=20chore:=20cn=20=EC=9C=A0?= =?UTF-8?q?=ED=8B=B8=20=ED=95=A8=EC=88=98=EC=9C=84=ED=95=9C=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=84=A4=EC=B9=98=20?= =?UTF-8?q?#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 +- pnpm-lock.yaml | 348 ++++++++++++++++++++++++++++++++++++++++++++++-- src/utils/cn.ts | 6 + 3 files changed, 350 insertions(+), 9 deletions(-) create mode 100644 src/utils/cn.ts diff --git a/package.json b/package.json index 879e8ea..220773a 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,14 @@ "formatting": "prettier --write '**/*.{ts,tsx}' && eslint --fix ." }, "dependencies": { + "@radix-ui/react-navigation-menu": "^1.2.0", "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", + "clsx": "^2.1.1", "next": "14.2.4", "react": "^18", "react-dom": "^18", + "tailwind-merge": "^2.4.0", "tailwindcss-radix": "^3.0.3", "uuid": "^10.0.0", "zod": "^3.23.8", @@ -47,7 +50,7 @@ "jiti": "^1.21.6", "postcss": "^8", "prettier": "^3.3.2", - "tailwindcss": "^3.4.4", + "tailwindcss": "^3.4.6", "typescript": "^5" }, "config": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 943debd..7c53ecb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,12 +8,18 @@ importers: .: dependencies: + '@radix-ui/react-navigation-menu': + specifier: ^1.2.0 + version: 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-query': specifier: ^5.50.1 version: 5.50.1(react@18.3.1) '@tanstack/react-query-devtools': specifier: ^5.50.1 version: 5.50.1(@tanstack/react-query@5.50.1(react@18.3.1))(react@18.3.1) + clsx: + specifier: ^2.1.1 + version: 2.1.1 next: specifier: 14.2.4 version: 14.2.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -23,6 +29,9 @@ importers: react-dom: specifier: ^18 version: 18.3.1(react@18.3.1) + tailwind-merge: + specifier: ^2.4.0 + version: 2.4.0 tailwindcss-radix: specifier: ^3.0.3 version: 3.0.3 @@ -92,7 +101,7 @@ importers: version: 12.1.1(eslint@8.57.0) eslint-plugin-tailwindcss: specifier: ^3.17.4 - version: 3.17.4(tailwindcss@3.4.4) + version: 3.17.4(tailwindcss@3.4.6) eslint-plugin-unused-imports: specifier: ^3.2.0 version: 3.2.0(@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0) @@ -109,8 +118,8 @@ importers: specifier: ^3.3.2 version: 3.3.2 tailwindcss: - specifier: ^3.4.4 - version: 3.4.4 + specifier: ^3.4.6 + version: 3.4.6 typescript: specifier: ^5 version: 5.5.3 @@ -286,6 +295,177 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@radix-ui/primitive@1.1.0': + resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} + + '@radix-ui/react-collection@1.1.0': + resolution: {integrity: sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-compose-refs@1.1.0': + resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-context@1.1.0': + resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-direction@1.1.0': + resolution: {integrity: sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-dismissable-layer@1.1.0': + resolution: {integrity: sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-id@1.1.0': + resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-navigation-menu@1.2.0': + resolution: {integrity: sha512-OQ8tcwAOR0DhPlSY3e4VMXeHiol7la4PPdJWhhwJiJA+NLX0SaCaonOkRnI3gCDHoZ7Fo7bb/G6q25fRM2Y+3Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-presence@1.1.0': + resolution: {integrity: sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-primitive@2.0.0': + resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.1.0': + resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-callback-ref@1.1.0': + resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-controllable-state@1.1.0': + resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-escape-keydown@1.1.0': + resolution: {integrity: sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.0': + resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-previous@1.1.0': + resolution: {integrity: sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-visually-hidden@1.1.0': + resolution: {integrity: sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@rushstack/eslint-patch@1.10.3': resolution: {integrity: sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==} @@ -715,6 +895,10 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -2140,11 +2324,14 @@ packages: resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} engines: {node: ^14.18.0 || >=16.0.0} + tailwind-merge@2.4.0: + resolution: {integrity: sha512-49AwoOQNKdqKPd9CViyH5wJoSKsCDjUlzL8DxuGp3P1FsGY36NJDAa18jLZcaHAUUuTj+JB8IAo8zWgBNvBF7A==} + tailwindcss-radix@3.0.3: resolution: {integrity: sha512-uueKWJIY98tU4Fip2FTL2eXBqX428e5HBwbu+8rqqJ9H3NuhkcAGS66wNHZjeix56f6nNBhkhMLpQeIrmVxH/w==} - tailwindcss@3.4.4: - resolution: {integrity: sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==} + tailwindcss@3.4.6: + resolution: {integrity: sha512-1uRHzPB+Vzu57ocybfZ4jh5Q3SdlH7XW23J5sQoM9LhE9eIOlzxer/3XPSsycvih3rboRsvt0QCmzSrqyOYUIA==} engines: {node: '>=14.0.0'} hasBin: true @@ -2506,6 +2693,147 @@ snapshots: '@pkgr/core@0.1.1': {} + '@radix-ui/primitive@1.1.0': {} + + '@radix-ui/react-collection@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-context': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-context@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-direction@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-dismissable-layer@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-id@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-navigation-menu@1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-collection': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-context': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-direction': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-dismissable-layer': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-id': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-presence': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-previous': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-visually-hidden': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-presence@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-primitive@2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-slot': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + + '@radix-ui/react-slot@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-use-callback-ref@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-use-controllable-state@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-use-previous@1.1.0(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-visually-hidden@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + '@rushstack/eslint-patch@1.10.3': {} '@swc/counter@0.1.3': {} @@ -3009,6 +3337,8 @@ snapshots: clone@1.0.4: {} + clsx@2.1.1: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -3475,11 +3805,11 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-tailwindcss@3.17.4(tailwindcss@3.4.4): + eslint-plugin-tailwindcss@3.17.4(tailwindcss@3.4.6): dependencies: fast-glob: 3.3.2 postcss: 8.4.39 - tailwindcss: 3.4.4 + tailwindcss: 3.4.6 eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0): dependencies: @@ -4660,9 +4990,11 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.6.3 + tailwind-merge@2.4.0: {} + tailwindcss-radix@3.0.3: {} - tailwindcss@3.4.4: + tailwindcss@3.4.6: dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 diff --git a/src/utils/cn.ts b/src/utils/cn.ts new file mode 100644 index 0000000..365058c --- /dev/null +++ b/src/utils/cn.ts @@ -0,0 +1,6 @@ +import { type ClassValue, clsx } from "clsx"; +import { twMerge } from "tailwind-merge"; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} From fb4b11f80e47d3a22f28bb18c2fa545ce1c1d918 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:07:10 +0900 Subject: [PATCH 03/14] =?UTF-8?q?=F0=9F=94=A7=20chore:=20reactQueryProvide?= =?UTF-8?q?r=20lib=20=ED=8F=B4=EB=8D=94=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/{providers => lib}/ReactQueryProvider.tsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{providers => lib}/ReactQueryProvider.tsx (100%) diff --git a/src/providers/ReactQueryProvider.tsx b/src/lib/ReactQueryProvider.tsx similarity index 100% rename from src/providers/ReactQueryProvider.tsx rename to src/lib/ReactQueryProvider.tsx From f019a3718735e0a35905030ac48a767eaea7feb8 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:07:48 +0900 Subject: [PATCH 04/14] =?UTF-8?q?=F0=9F=94=A7=20chore:=20=EB=AF=B8?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20CSS=20=EC=82=AD=EC=A0=9C=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/globals.css | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/styles/globals.css b/src/styles/globals.css index 875c01e..39a9271 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -2,30 +2,6 @@ @tailwind components; @tailwind utilities; -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} - @layer utilities { .text-balance { text-wrap: balance; From 4a3666874e1af06ef9c019cb7e8c2847cfe214a0 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:09:13 +0900 Subject: [PATCH 05/14] =?UTF-8?q?=F0=9F=92=85=20style:=20mobile-first=20?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EA=B5=AC=ED=98=84=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/layout.tsx | 11 ++++-- src/layout/Mobile/MobileBottomNavBar.tsx | 50 ++++++++++++++++++++++++ src/layout/Mobile/MobileLayout.tsx | 16 ++++++++ 3 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 src/layout/Mobile/MobileBottomNavBar.tsx create mode 100644 src/layout/Mobile/MobileLayout.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 4923103..d2c7d68 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,7 +4,8 @@ import "../styles/globals.css"; import type { Metadata } from "next"; import { Inter } from "next/font/google"; -import ReactQueryProvider from "@/providers/ReactQueryProvider"; +import MobileLayout from "@/layout/Mobile/MobileLayout"; +import ReactQueryProvider from "@/lib/ReactQueryProvider"; const inter = Inter({ subsets: ["latin"] }); @@ -19,9 +20,11 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - - - {children} + + + + {children} + ); diff --git a/src/layout/Mobile/MobileBottomNavBar.tsx b/src/layout/Mobile/MobileBottomNavBar.tsx new file mode 100644 index 0000000..269e83e --- /dev/null +++ b/src/layout/Mobile/MobileBottomNavBar.tsx @@ -0,0 +1,50 @@ +"use client"; + +import * as NM from "@radix-ui/react-navigation-menu"; +import NextLink, { LinkProps } from "next/link"; +import { usePathname } from "next/navigation"; + +const navigations = [ + { name: "홈", slug: "/" }, + { name: "캘린더", slug: "/calendar" }, + { name: "지도", slug: "/map" }, + { name: "채팅", slug: "/chat" }, + { name: "내정보", slug: "/mypage" }, +]; + +const Link = ({ + href, + ...props +}: LinkProps & { children: React.ReactNode }) => { + const pathname = usePathname(); + const isActive = href === pathname; + + return ( + + + + ); +}; + +const MobileBottomNavBar = () => { + const pathname = usePathname(); + console.log(pathname); + + return ( + + + {navigations.map((nav) => ( + + {nav.name} + + ))} + + + ); +}; + +export default MobileBottomNavBar; diff --git a/src/layout/Mobile/MobileLayout.tsx b/src/layout/Mobile/MobileLayout.tsx new file mode 100644 index 0000000..60a0275 --- /dev/null +++ b/src/layout/Mobile/MobileLayout.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +import MobileBottomNavBar from "./MobileBottomNavBar"; + +const MobileLayout = ({ children }: { children: React.ReactNode }) => { + return ( +
+
+ {children} + +
+
+ ); +}; + +export default MobileLayout; From eae39ece227659161a4c1cc8d2376295535716c6 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:09:54 +0900 Subject: [PATCH 06/14] =?UTF-8?q?=E2=9C=85=20test:=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EC=9A=A9=20=EB=8D=94=EB=AF=B8=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=83=9D=EC=84=B1=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/calendar/page.tsx | 7 +++ src/app/chat/page.tsx | 7 +++ src/app/map/page.tsx | 7 +++ src/app/mypage/page.tsx | 7 +++ src/app/page.tsx | 116 +++----------------------------------- 5 files changed, 36 insertions(+), 108 deletions(-) create mode 100644 src/app/calendar/page.tsx create mode 100644 src/app/chat/page.tsx create mode 100644 src/app/map/page.tsx create mode 100644 src/app/mypage/page.tsx diff --git a/src/app/calendar/page.tsx b/src/app/calendar/page.tsx new file mode 100644 index 0000000..d121ce6 --- /dev/null +++ b/src/app/calendar/page.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const page = () => { + return
calender
; +}; + +export default page; diff --git a/src/app/chat/page.tsx b/src/app/chat/page.tsx new file mode 100644 index 0000000..4ba0d70 --- /dev/null +++ b/src/app/chat/page.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const page = () => { + return
chat
; +}; + +export default page; diff --git a/src/app/map/page.tsx b/src/app/map/page.tsx new file mode 100644 index 0000000..1a1a233 --- /dev/null +++ b/src/app/map/page.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const page = () => { + return
map
; +}; + +export default page; diff --git a/src/app/mypage/page.tsx b/src/app/mypage/page.tsx new file mode 100644 index 0000000..2aafca4 --- /dev/null +++ b/src/app/mypage/page.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const page = () => { + return
mypage
; +}; + +export default page; diff --git a/src/app/page.tsx b/src/app/page.tsx index 2acfd44..43caf5f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,113 +1,13 @@ -import Image from "next/image"; - export default function Home() { return ( -
-
-

- Get started by editing  - src/app/page.tsx -

- -
- -
- Next.js Logo -
- - +
+
+
+
+
+
+
+
); } From 3ea4190cdb2b4452bc6f90c0be4ad664c7157bce Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:15:01 +0900 Subject: [PATCH 07/14] =?UTF-8?q?=F0=9F=92=85=20style:=20=EB=B0=94?= =?UTF-8?q?=ED=85=80=20=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EB=B0=94=20=EB=86=92=EC=9D=B4=20tailwind=20config=EC=97=90=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/.keep | 0 src/layout/Mobile/MobileBottomNavBar.tsx | 5 +---- src/layout/Mobile/MobileLayout.tsx | 2 +- tailwind.config.ts | 6 ++++++ 4 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 src/layout/.keep diff --git a/src/layout/.keep b/src/layout/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/src/layout/Mobile/MobileBottomNavBar.tsx b/src/layout/Mobile/MobileBottomNavBar.tsx index 269e83e..68aed27 100644 --- a/src/layout/Mobile/MobileBottomNavBar.tsx +++ b/src/layout/Mobile/MobileBottomNavBar.tsx @@ -31,11 +31,8 @@ const Link = ({ }; const MobileBottomNavBar = () => { - const pathname = usePathname(); - console.log(pathname); - return ( - + {navigations.map((nav) => ( diff --git a/src/layout/Mobile/MobileLayout.tsx b/src/layout/Mobile/MobileLayout.tsx index 60a0275..8f48c2c 100644 --- a/src/layout/Mobile/MobileLayout.tsx +++ b/src/layout/Mobile/MobileLayout.tsx @@ -5,7 +5,7 @@ import MobileBottomNavBar from "./MobileBottomNavBar"; const MobileLayout = ({ children }: { children: React.ReactNode }) => { return (
-
+
{children}
diff --git a/tailwind.config.ts b/tailwind.config.ts index a7a236f..d5f9b6f 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -16,11 +16,17 @@ const config: Config = { "m-lg": "450px", }, extend: { + margin: { + "btm-nav-bar": "50px", + }, minWidth: { "m-sm": "320px", "m-md": "375px", "m-lg": "450px", }, + minHeight: { + "btm-nav-bar": "50px", + }, }, }, plugins: [require("tailwindcss-radix")], From c48cd679e2506082cf30d733b0530ec15e226270 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 02:40:42 +0900 Subject: [PATCH 08/14] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20perf:=20link=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8=20prefetch=20=EC=86=8D=EC=84=B1=20=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/Mobile/MobileBottomNavBar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layout/Mobile/MobileBottomNavBar.tsx b/src/layout/Mobile/MobileBottomNavBar.tsx index 68aed27..f757dc6 100644 --- a/src/layout/Mobile/MobileBottomNavBar.tsx +++ b/src/layout/Mobile/MobileBottomNavBar.tsx @@ -23,6 +23,7 @@ const Link = ({ From dd1677c168952f1576fefec4b97e009ec402a1b9 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 03:01:29 +0900 Subject: [PATCH 09/14] =?UTF-8?q?=F0=9F=94=A8=20settings:=20=EC=BB=A4?= =?UTF-8?q?=EB=B0=8B=20=EC=BB=A8=EB=B2=A4=EC=85=98=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?-=20CICD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cz-config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.cz-config.ts b/.cz-config.ts index ec49c7a..005ec8e 100644 --- a/.cz-config.ts +++ b/.cz-config.ts @@ -1,3 +1,5 @@ +// https://kjm99d.tistory.com/20 + module.exports = { types: [ { value: "✨ feat", name: "✨ feat: 새로운 기능 추가" }, @@ -11,6 +13,10 @@ module.exports = { value: "♻️ refactor", name: "♻️ refactor: 버그 수정이나 새로운 기능 추가가 아닌 코드 변경", }, + { + value: "👷 cicd", + name: "👷 cicd: CICD 관련 수정", + }, { value: "⚡️ perf", name: "⚡️ perf: 성능을 개선하는 코드 변경", From 0ad9ae5c8ca84f82744df35b36509e2be8e843b0 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 03:01:58 +0900 Subject: [PATCH 10/14] =?UTF-8?q?=F0=9F=91=B7=20cicd:=20pR=20=EA=B2=80?= =?UTF-8?q?=EC=A6=9D=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20dev?= =?UTF-8?q?elop=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index d19c902..08721ca 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -3,7 +3,7 @@ name: "PR Test" on: pull_request: types: [opened, reopened] - branches: [main] + branches: [main, develop] jobs: build: From f352dfac6fc3679414ab458953d974cd86ec750a Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 03:09:19 +0900 Subject: [PATCH 11/14] =?UTF-8?q?=F0=9F=91=B7=20cicd:=20pnpm=20=EC=84=A0-?= =?UTF-8?q?=EC=84=A4=EC=B9=98=20=EC=95=A1=EC=85=98=20action=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/_build.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 8b44d5c..9330316 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -12,6 +12,12 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false + - name: Set up Node.js version uses: actions/setup-node@v3 with: From ca27009001aaf4ef93aa89eb3eaa1adc0480d435 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 03:19:31 +0900 Subject: [PATCH 12/14] =?UTF-8?q?=F0=9F=91=B7=20cicd:=20pnpm-lock.yaml=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=EC=9C=BC=EB=A1=9C=20=EC=BA=90=EC=8B=9C=20?= =?UTF-8?q?=ED=82=A4=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 9330316..234986e 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -23,6 +23,7 @@ jobs: with: node-version: ${{ inputs.NODE_VERSION }} cache: "pnpm" + cache-dependency-path: '**/pnpm-lock.yaml' - name: Install dependencies run: | From 549d4e0f5449237a9e70762f6dd16fa393e761c4 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Wed, 24 Jul 2024 03:20:14 +0900 Subject: [PATCH 13/14] =?UTF-8?q?=F0=9F=91=B7=20cicd:=20pR=20=EC=83=88?= =?UTF-8?q?=EB=A1=9C=EC=9A=B4=20=EC=BB=A4=EB=B0=8B=20=ED=91=B8=EC=8B=9C?= =?UTF-8?q?=EC=8B=9C=20PR-test=20=ED=8A=B8=EB=A6=AC=EA=B1=B0=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 08721ca..f2f5ba2 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -2,7 +2,7 @@ name: "PR Test" on: pull_request: - types: [opened, reopened] + types: [opened, reopened, synchronize] branches: [main, develop] jobs: From c676c169ba4797c60de900226ceb4a10fc4cccf8 Mon Sep 17 00:00:00 2001 From: Jeongmin Lee Date: Thu, 25 Jul 2024 01:47:55 +0900 Subject: [PATCH 14/14] =?UTF-8?q?=F0=9F=90=9B=20fix:=20pR=20=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=20=EB=B0=98=EC=98=81=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/Mobile/MobileBottomNavBar.tsx | 27 +++-------------------- src/layout/Mobile/MobileBottomNavLink.tsx | 26 ++++++++++++++++++++++ src/layout/Mobile/MobileLayout.tsx | 2 -- 3 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 src/layout/Mobile/MobileBottomNavLink.tsx diff --git a/src/layout/Mobile/MobileBottomNavBar.tsx b/src/layout/Mobile/MobileBottomNavBar.tsx index f757dc6..e6ee31d 100644 --- a/src/layout/Mobile/MobileBottomNavBar.tsx +++ b/src/layout/Mobile/MobileBottomNavBar.tsx @@ -1,8 +1,6 @@ -"use client"; - import * as NM from "@radix-ui/react-navigation-menu"; -import NextLink, { LinkProps } from "next/link"; -import { usePathname } from "next/navigation"; + +import NavLink from "./MobileBottomNavLink"; const navigations = [ { name: "홈", slug: "/" }, @@ -12,32 +10,13 @@ const navigations = [ { name: "내정보", slug: "/mypage" }, ]; -const Link = ({ - href, - ...props -}: LinkProps & { children: React.ReactNode }) => { - const pathname = usePathname(); - const isActive = href === pathname; - - return ( - - - - ); -}; - const MobileBottomNavBar = () => { return ( {navigations.map((nav) => ( - {nav.name} + {nav.name} ))} diff --git a/src/layout/Mobile/MobileBottomNavLink.tsx b/src/layout/Mobile/MobileBottomNavLink.tsx new file mode 100644 index 0000000..dafad4a --- /dev/null +++ b/src/layout/Mobile/MobileBottomNavLink.tsx @@ -0,0 +1,26 @@ +"use client"; + +import * as NM from "@radix-ui/react-navigation-menu"; +import NextLink, { LinkProps } from "next/link"; +import { usePathname } from "next/navigation"; + +const NavLink = ({ + href, + ...props +}: LinkProps & { children: React.ReactNode }) => { + const pathname = usePathname(); + const isActive = href === pathname; + + return ( + + + + ); +}; + +export default NavLink; diff --git a/src/layout/Mobile/MobileLayout.tsx b/src/layout/Mobile/MobileLayout.tsx index 8f48c2c..55909fc 100644 --- a/src/layout/Mobile/MobileLayout.tsx +++ b/src/layout/Mobile/MobileLayout.tsx @@ -1,5 +1,3 @@ -import React from "react"; - import MobileBottomNavBar from "./MobileBottomNavBar"; const MobileLayout = ({ children }: { children: React.ReactNode }) => {