From cacb2b38c1c8e7d984b3165360247ba9e5a25c6b Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 16 Sep 2024 01:10:54 +0900 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20env=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3b0b4037..816f994b 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,6 @@ dist-ssr *.sln *.sw? -.env \ No newline at end of file +.env +.env.makers +.env.sopt \ No newline at end of file From 7fce6cce34e7b8c65b72210c77f052303be5ca78 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 16 Sep 2024 01:11:03 +0900 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20build=20=EB=AA=85=EB=A0=B9?= =?UTF-8?q?=EC=96=B4=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b68861c8..5496d4e4 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,11 @@ "type": "module", "scripts": { "dev": "vite", + "dev:makers": "vite --mode makers", + "dev:sopt": "vite --mode sopt", "build": "tsc && vite build", + "build:makers": "tsc && NODE_ENV=makers vite build --mode makers", + "build:sopt": "tsc && NODE_ENV=sopt vite build --mode sopt", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "test": "vitest" @@ -63,4 +67,4 @@ "vite": "^5.2.0", "vitest": "^2.0.5" } -} +} \ No newline at end of file From 5e4bd1652e02a915e0c073bfef1fda30ed2301f9 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Mon, 23 Sep 2024 21:33:50 +0900 Subject: [PATCH 03/10] =?UTF-8?q?install:=20react-helmet-async=20=EC=84=A4?= =?UTF-8?q?=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- yarn.lock | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5496d4e4..4f1992c9 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "react": "^18.2.0", "react-daum-postcode": "^3.1.3", "react-dom": "^18.2.0", + "react-helmet-async": "^2.0.5", "react-hook-form": "^7.51.5", "react-responsive": "^10.0.0", "react-router-dom": "^6.23.1" @@ -67,4 +68,4 @@ "vite": "^5.2.0", "vitest": "^2.0.5" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 906565cc..396072c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3519,6 +3519,13 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" @@ -3885,7 +3892,7 @@ long@^5.0.0: resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== -loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -4373,6 +4380,20 @@ react-dom@^18.2.0: loose-envify "^1.1.0" scheduler "^0.23.2" +react-fast-compare@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49" + integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ== + +react-helmet-async@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/react-helmet-async/-/react-helmet-async-2.0.5.tgz#cfc70cd7bb32df7883a8ed55502a1513747223ec" + integrity sha512-rYUYHeus+i27MvFE+Jaa4WsyBKGkL6qVgbJvSBoX8mbsWoABJXdEO0bZyi0F6i+4f0NuIb8AvqPMj3iXFHkMwg== + dependencies: + invariant "^2.2.4" + react-fast-compare "^3.2.2" + shallowequal "^1.1.0" + react-hook-form@^7.51.5: version "7.51.5" resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.51.5.tgz#4afbfb819312db9fea23e8237a3a0d097e128b43" @@ -4668,6 +4689,11 @@ shallow-equal@^3.1.0: resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-3.1.0.tgz#e7a54bac629c7f248eff6c2f5b63122ba4320bec" integrity sha512-pfVOw8QZIXpMbhBWvzBISicvToTiM5WBF1EeAUZDDSb5Dt29yl4AYbyywbJFSEsRUMr7gJaxqCdr4L3tQf9wVg== +shallowequal@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" From f2246dfcfa873bbeea615df6403477ff9f2ad510 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 16:03:01 +0900 Subject: [PATCH 04/10] =?UTF-8?q?feat:=20provider=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 77428f5e..a2bcfaa6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -15,6 +15,7 @@ import BigLoading from 'views/loadings/BigLoding'; import 'styles/reset.css'; import useDialog from '@hooks/useDialog'; +import { HelmetProvider } from 'react-helmet-async'; const SessionExpiredDialog = lazy(() => import('views/dialogs').then(({ SessionExpiredDialog }) => ({ default: SessionExpiredDialog })), @@ -112,20 +113,22 @@ const App = () => { return ( <> - - - - - -
- }> - - -
-
-
-
-
+ + + + + + +
+ }> + + +
+
+
+
+
+
); }; From c610902a3b6617bdbbdd5e83acc285e0c39672cf Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 16:21:10 +0900 Subject: [PATCH 05/10] =?UTF-8?q?feat:=20index.html=EC=97=90=EC=84=9C=20he?= =?UTF-8?q?lmet=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 26 ----------- .../Layout/components/Head/index.tsx | 45 +++++++++++++++++++ src/common/components/Layout/index.tsx | 2 + 3 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 src/common/components/Layout/components/Head/index.tsx diff --git a/index.html b/index.html index b53c56a2..b2da0075 100644 --- a/index.html +++ b/index.html @@ -17,33 +17,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - SOPT makers 모집 지원하기 - - diff --git a/src/common/components/Layout/components/Head/index.tsx b/src/common/components/Layout/components/Head/index.tsx new file mode 100644 index 00000000..fef87f30 --- /dev/null +++ b/src/common/components/Layout/components/Head/index.tsx @@ -0,0 +1,45 @@ +import { useRecruitingInfo } from 'contexts/RecruitingInfoProvider'; +import { Helmet } from 'react-helmet-async'; + +const Head = () => { + const { + recruitingInfo: { isMakers }, + } = useRecruitingInfo(); + + const TOUCH_ICON = isMakers ? '/makers-touch-icon.png' : '/apple-touch-icon.png'; + const ICON = isMakers ? '/makersIcon.svg' : '/icon.svg'; + const FAVICON = isMakers ? '/makersFavicon.ico' : '/favicon.ico'; + const SITE_NAME = `SOPT ${isMakers ? 'makers ' : ''}리크루팅`; + const TITLE = `SOPT ${isMakers ? 'makers ' : ''}모집 지원하기`; + const IMAGE = isMakers ? '/makersOg.png' : '/imgOg.png'; + const DESCRIPTION = `SOPT${isMakers ? ' makers' : ''}의 신입 기수 모집페이지입니다.`; + + return ( + + + + + + + + + + + + + + + + + + + + + {TITLE} + + + + ); +}; + +export default Head; diff --git a/src/common/components/Layout/index.tsx b/src/common/components/Layout/index.tsx index efa65efa..d8e4bc15 100644 --- a/src/common/components/Layout/index.tsx +++ b/src/common/components/Layout/index.tsx @@ -4,10 +4,12 @@ import { Outlet } from 'react-router-dom'; import Header from './components/Header'; import ScrollToTop from './components/ScrollToTop'; import { container, mainWrapper } from './style.css'; +import Head from './components/Head'; const Layout = ({ children }: PropsWithChildren) => { return (
+
{children || }
From 912d48b6a8d0c27787d6b77257737bab786c6179 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 16:24:06 +0900 Subject: [PATCH 06/10] =?UTF-8?q?feat:=20URL=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/components/Layout/components/Head/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/components/Layout/components/Head/index.tsx b/src/common/components/Layout/components/Head/index.tsx index fef87f30..e740c8ed 100644 --- a/src/common/components/Layout/components/Head/index.tsx +++ b/src/common/components/Layout/components/Head/index.tsx @@ -13,6 +13,7 @@ const Head = () => { const TITLE = `SOPT ${isMakers ? 'makers ' : ''}모집 지원하기`; const IMAGE = isMakers ? '/makersOg.png' : '/imgOg.png'; const DESCRIPTION = `SOPT${isMakers ? ' makers' : ''}의 신입 기수 모집페이지입니다.`; + const URL = isMakers ? 'https://recruiting.sopt.org' : 'https://recruit.sopt.org'; return ( @@ -23,6 +24,7 @@ const Head = () => { + @@ -38,6 +40,7 @@ const Head = () => { {TITLE} + ); }; From 2124ca48a5b96c1f9a4c007977601b9b4c639a53 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 17:15:56 +0900 Subject: [PATCH 07/10] =?UTF-8?q?fix:=20isMakers=20context->env=EB=A1=9C?= =?UTF-8?q?=20=EA=B0=80=EC=A0=B8=EC=98=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/components/Layout/components/Head/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/common/components/Layout/components/Head/index.tsx b/src/common/components/Layout/components/Head/index.tsx index e740c8ed..513504e6 100644 --- a/src/common/components/Layout/components/Head/index.tsx +++ b/src/common/components/Layout/components/Head/index.tsx @@ -1,10 +1,7 @@ -import { useRecruitingInfo } from 'contexts/RecruitingInfoProvider'; import { Helmet } from 'react-helmet-async'; const Head = () => { - const { - recruitingInfo: { isMakers }, - } = useRecruitingInfo(); + const isMakers = !import.meta.env.VITE_TEAM_NAME.includes('makers'); const TOUCH_ICON = isMakers ? '/makers-touch-icon.png' : '/apple-touch-icon.png'; const ICON = isMakers ? '/makersIcon.svg' : '/icon.svg'; From 2ffcdba6dcd46d7c4258886e9f9c876c416db203 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 17:19:12 +0900 Subject: [PATCH 08/10] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EC=9A=A9=20=EC=97=B0=EC=82=B0=EC=9E=90=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/components/Layout/components/Head/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/components/Layout/components/Head/index.tsx b/src/common/components/Layout/components/Head/index.tsx index 513504e6..5eb854ef 100644 --- a/src/common/components/Layout/components/Head/index.tsx +++ b/src/common/components/Layout/components/Head/index.tsx @@ -1,7 +1,7 @@ import { Helmet } from 'react-helmet-async'; const Head = () => { - const isMakers = !import.meta.env.VITE_TEAM_NAME.includes('makers'); + const isMakers = import.meta.env.VITE_TEAM_NAME.includes('makers'); const TOUCH_ICON = isMakers ? '/makers-touch-icon.png' : '/apple-touch-icon.png'; const ICON = isMakers ? '/makersIcon.svg' : '/icon.svg'; From 244809957d931a2a9ec5b1dd49d45a80a3856248 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 21:56:54 +0900 Subject: [PATCH 09/10] =?UTF-8?q?fix:=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EB=A7=90=EA=B3=A0=20MODE=20=ED=99=9C=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/components/Layout/components/Head/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/components/Layout/components/Head/index.tsx b/src/common/components/Layout/components/Head/index.tsx index 5eb854ef..9cb34016 100644 --- a/src/common/components/Layout/components/Head/index.tsx +++ b/src/common/components/Layout/components/Head/index.tsx @@ -1,7 +1,7 @@ import { Helmet } from 'react-helmet-async'; const Head = () => { - const isMakers = import.meta.env.VITE_TEAM_NAME.includes('makers'); + const isMakers = import.meta.env.MODE.includes('makers'); const TOUCH_ICON = isMakers ? '/makers-touch-icon.png' : '/apple-touch-icon.png'; const ICON = isMakers ? '/makersIcon.svg' : '/icon.svg'; From 06951729f60a4369aae8443218bf2784194c7d6c Mon Sep 17 00:00:00 2001 From: lydiacho Date: Tue, 24 Sep 2024 23:48:43 +0900 Subject: [PATCH 10/10] =?UTF-8?q?fix:=20useDate=20=EB=82=B4=EB=B6=80=20isM?= =?UTF-8?q?akers=EB=8F=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/hooks/useDate.tsx | 2 +- src/views/CompletePage/index.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/hooks/useDate.tsx b/src/common/hooks/useDate.tsx index 88245903..d5c000fc 100644 --- a/src/common/hooks/useDate.tsx +++ b/src/common/hooks/useDate.tsx @@ -62,7 +62,7 @@ const useDate = () => { const NoMoreReview = afterInterview; // 면접 마감 -> 지원서 확인 불가 const NoMoreFinalResult = beforeFinalResult || afterRecruiting; // 최종 합불 확인 기간 아님 - const isMakers = name?.toLowerCase().includes('makers'); + const isMakers = import.meta.env.MODE.includes('makers'); useEffect(() => { handleSaveRecruitingInfo({ diff --git a/src/views/CompletePage/index.tsx b/src/views/CompletePage/index.tsx index 6740f06b..8eab6315 100644 --- a/src/views/CompletePage/index.tsx +++ b/src/views/CompletePage/index.tsx @@ -12,9 +12,8 @@ import { container, iconVar, mainTextVar, subTextVar } from './style.css'; const CompletePage = () => { const { deviceType } = useDeviceType(); const { - recruitingInfo: { name, season, group, soptName }, + recruitingInfo: { name, season, group, soptName, isMakers }, } = useRecruitingInfo(); - const isMakers = soptName?.toLowerCase().includes('makers'); const handleClickMyPage = () => { track('click-complete-my');