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/package.json b/package.json index 029afed8..3bf29f73 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/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 ( <> - - - - - -
- }> - - -
-
-
-
-
+ + + + + + +
+ }> + + +
+
+
+
+
+
); }; 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..9cb34016 --- /dev/null +++ b/src/common/components/Layout/components/Head/index.tsx @@ -0,0 +1,45 @@ +import { Helmet } from 'react-helmet-async'; + +const Head = () => { + 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'; + 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' : ''}의 신입 기수 모집페이지입니다.`; + const URL = isMakers ? 'https://recruiting.sopt.org' : 'https://recruit.sopt.org'; + + 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 || }
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'); 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"