diff --git a/client/index.html b/client/index.html
index 936ec3b3..4941192d 100644
--- a/client/index.html
+++ b/client/index.html
@@ -3,6 +3,15 @@
+
+
+
+
+
+
+
+
+
Hybrid-JGS
diff --git a/client/package.json b/client/package.json
index 74001742..b57f39f9 100644
--- a/client/package.json
+++ b/client/package.json
@@ -1,56 +1,56 @@
{
- "name": "client",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "tsc -b && vite build",
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
- "preview": "vite preview",
- "storybook": "storybook dev -p 6006",
- "build-storybook": "storybook build"
- },
- "dependencies": {
- "class-variance-authority": "^0.7.0",
- "dom-to-image": "^2.6.0",
- "framer-motion": "^11.3.7",
- "react": "^18.3.1",
- "react-cookie": "^7.2.0",
- "react-dom": "^18.3.1",
- "react-error-boundary": "^4.0.13",
- "react-router-dom": "^6.25.1",
- "vite-plugin-svgr": "^4.2.0"
- },
- "devDependencies": {
- "@chromatic-com/storybook": "^1.6.1",
- "@storybook/addon-essentials": "^8.2.5",
- "@storybook/addon-interactions": "^8.2.5",
- "@storybook/addon-links": "^8.2.5",
- "@storybook/addon-onboarding": "^8.2.5",
- "@storybook/blocks": "^8.2.5",
- "@storybook/react": "^8.2.5",
- "@storybook/react-vite": "^8.2.5",
- "@storybook/test": "^8.2.5",
- "@trivago/prettier-plugin-sort-imports": "^4.3.0",
- "@types/react": "^18.3.3",
- "@types/react-dom": "^18.3.0",
- "@typescript-eslint/eslint-plugin": "^7.15.0",
- "@typescript-eslint/parser": "^7.15.0",
- "@vitejs/plugin-react": "^4.3.1",
- "autoprefixer": "^10.4.19",
- "eslint": "^8.57.0",
- "eslint-config-prettier": "^9.1.0",
- "eslint-plugin-prettier": "^5.2.1",
- "eslint-plugin-react": "^7.34.4",
- "eslint-plugin-react-hooks": "^4.6.2",
- "eslint-plugin-react-refresh": "^0.4.7",
- "eslint-plugin-storybook": "^0.8.0",
- "postcss": "^8.4.39",
- "prettier": "^3.3.3",
- "storybook": "^8.2.5",
- "tailwindcss": "^3.4.6",
- "typescript": "^5.2.2",
- "vite": "^5.3.4"
- }
+ "name": "client",
+ "private": true,
+ "version": "0.0.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "tsc -b && vite build",
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
+ "preview": "vite preview",
+ "storybook": "storybook dev -p 6006",
+ "build-storybook": "storybook build"
+ },
+ "dependencies": {
+ "class-variance-authority": "^0.7.0",
+ "dom-to-image": "^2.6.0",
+ "framer-motion": "^11.3.7",
+ "react": "^18.3.1",
+ "react-cookie": "^7.2.0",
+ "react-dom": "^18.3.1",
+ "react-error-boundary": "^4.0.13",
+ "react-router-dom": "^6.25.1",
+ "vite-plugin-svgr": "^4.2.0"
+ },
+ "devDependencies": {
+ "@chromatic-com/storybook": "^1.6.1",
+ "@storybook/addon-essentials": "^8.2.5",
+ "@storybook/addon-interactions": "^8.2.5",
+ "@storybook/addon-links": "^8.2.5",
+ "@storybook/addon-onboarding": "^8.2.5",
+ "@storybook/blocks": "^8.2.5",
+ "@storybook/react": "^8.2.5",
+ "@storybook/react-vite": "^8.2.5",
+ "@storybook/test": "^8.2.5",
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
+ "@types/react": "^18.3.3",
+ "@types/react-dom": "^18.3.0",
+ "@typescript-eslint/eslint-plugin": "^7.15.0",
+ "@typescript-eslint/parser": "^7.15.0",
+ "@vitejs/plugin-react": "^4.3.1",
+ "autoprefixer": "^10.4.19",
+ "eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.2.1",
+ "eslint-plugin-react": "^7.34.4",
+ "eslint-plugin-react-hooks": "^4.6.2",
+ "eslint-plugin-react-refresh": "^0.4.7",
+ "eslint-plugin-storybook": "^0.8.0",
+ "postcss": "^8.4.39",
+ "prettier": "^3.3.3",
+ "storybook": "^8.2.5",
+ "tailwindcss": "^3.4.6",
+ "typescript": "^5.2.2",
+ "vite": "^5.3.4"
+ }
}
diff --git a/client/public/assets/favicon.ico b/client/public/assets/favicon.ico
new file mode 100644
index 00000000..f2aa6d11
Binary files /dev/null and b/client/public/assets/favicon.ico differ
diff --git a/client/public/assets/og-image.png b/client/public/assets/og-image.png
new file mode 100644
index 00000000..c8577754
Binary files /dev/null and b/client/public/assets/og-image.png differ
diff --git a/client/src/constants/cookie.ts b/client/src/constants/cookie.ts
index 7b427b53..c359e9aa 100644
--- a/client/src/constants/cookie.ts
+++ b/client/src/constants/cookie.ts
@@ -1,4 +1,4 @@
export const COOKIE_KEY = {
ACCESS_TOKEN: "token",
- INVITE_USER: "referrerId",
+ INVITE_USER: "referralId",
} as const;
diff --git a/client/src/features/CasperCustom/CasperCustomForm.tsx b/client/src/features/CasperCustom/CasperCustomForm.tsx
index fd15a037..0465f00a 100644
--- a/client/src/features/CasperCustom/CasperCustomForm.tsx
+++ b/client/src/features/CasperCustom/CasperCustomForm.tsx
@@ -28,9 +28,9 @@ export function CasperCustomForm({ navigateNextStep }: CasperCustomFormProps) {
fetchData: postCasper,
} = useFetch<
PostCasperResponse,
- { token: string; referrerId: string; casper: CasperInformationType }
- >(({ token, referrerId, casper }) =>
- LotteryAPI.postCasper(token, { ...casper, [COOKIE_KEY.INVITE_USER]: referrerId })
+ { token: string; referralId: string; casper: CasperInformationType }
+ >(({ token, referralId, casper }) =>
+ LotteryAPI.postCasper(token, { ...casper, [COOKIE_KEY.INVITE_USER]: referralId })
);
const { casperName, expectations, selectedCasperIdx } = useCasperCustomStateContext();
@@ -85,7 +85,7 @@ export function CasperCustomForm({ navigateNextStep }: CasperCustomFormProps) {
await postCasper({
token: cookies[COOKIE_KEY.ACCESS_TOKEN],
- referrerId: cookies[COOKIE_KEY.INVITE_USER],
+ referralId: cookies[COOKIE_KEY.INVITE_USER],
casper,
});
};
diff --git a/client/src/hooks/useFetch.ts b/client/src/hooks/useFetch.ts
index fa04daa7..2be29137 100644
--- a/client/src/hooks/useFetch.ts
+++ b/client/src/hooks/useFetch.ts
@@ -9,6 +9,9 @@ export default function useFetch(fetch: (params: P) => Promise)
const { showBoundary } = useErrorBoundary();
const fetchData = async (params?: P) => {
+ setIsError(false);
+ setIsSuccess(false);
+
try {
const data = await fetch(params as P);
setData(data);
diff --git a/client/src/pages/ErrorElement/index.tsx b/client/src/pages/ErrorElement/index.tsx
index dd867ee3..d89e5a90 100644
--- a/client/src/pages/ErrorElement/index.tsx
+++ b/client/src/pages/ErrorElement/index.tsx
@@ -5,6 +5,10 @@ interface ErrorElementProps {
}
export default function ErrorElement({ fallbackUrl = "/" }: ErrorElementProps) {
+ const handleClickButton = () => {
+ window.location.href = fallbackUrl;
+ };
+
return (
@@ -13,7 +17,7 @@ export default function ErrorElement({ fallbackUrl = "/" }: ErrorElementProps) {
문제가 발생했습니다. 잠시 후 다시 시도해 보세요.
-
+
);
}
diff --git a/client/yarn.lock b/client/yarn.lock
index e76914a0..e116928b 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -5974,7 +5974,16 @@ storybook@^8.2.5:
tiny-invariant "^1.3.1"
ts-dedent "^2.0.0"
-"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
+"string-width-cjs@npm:string-width@^4.2.0":
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.1"
+
+string-width@^4.1.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -6053,7 +6062,14 @@ string_decoder@^1.1.1:
dependencies:
safe-buffer "~5.2.0"
-"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
+ dependencies:
+ ansi-regex "^5.0.1"
+
+strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==