diff --git a/package.json b/package.json index 8b928998..ba3fead4 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "ts-node": "^10.9.2", "typescript": "^5.2.2", "vite": "^5.0.8", + "vite-bundle-analyzer": "^0.10.5", "vite-plugin-mkcert": "^1.17.3", "vite-plugin-radar": "^0.9.6", "vite-plugin-svgr": "^4.2.0" diff --git a/src/Assets/images/background.png b/src/Assets/images/background.png deleted file mode 100644 index c37a073b..00000000 Binary files a/src/Assets/images/background.png and /dev/null differ diff --git a/src/Assets/images/background.webp b/src/Assets/images/background.webp new file mode 100644 index 00000000..236e1c16 Binary files /dev/null and b/src/Assets/images/background.webp differ diff --git a/src/Assets/images/banner1.png b/src/Assets/images/banner1.png deleted file mode 100644 index 90d65e66..00000000 Binary files a/src/Assets/images/banner1.png and /dev/null differ diff --git a/src/Assets/images/banner1.webp b/src/Assets/images/banner1.webp new file mode 100644 index 00000000..7ca2ef42 Binary files /dev/null and b/src/Assets/images/banner1.webp differ diff --git a/src/Assets/images/banner2.png b/src/Assets/images/banner2.png deleted file mode 100644 index 9519024e..00000000 Binary files a/src/Assets/images/banner2.png and /dev/null differ diff --git a/src/Assets/images/banner2.webp b/src/Assets/images/banner2.webp new file mode 100644 index 00000000..aa0721bf Binary files /dev/null and b/src/Assets/images/banner2.webp differ diff --git a/src/Assets/images/blank-logo.png b/src/Assets/images/blank-logo.png deleted file mode 100644 index 9ca428c2..00000000 Binary files a/src/Assets/images/blank-logo.png and /dev/null differ diff --git a/src/Assets/images/blank-logo.webp b/src/Assets/images/blank-logo.webp new file mode 100644 index 00000000..fbbf9ece Binary files /dev/null and b/src/Assets/images/blank-logo.webp differ diff --git a/src/Assets/images/character1.png b/src/Assets/images/character1.png deleted file mode 100644 index 4332aa70..00000000 Binary files a/src/Assets/images/character1.png and /dev/null differ diff --git a/src/Assets/images/character1.webp b/src/Assets/images/character1.webp new file mode 100644 index 00000000..8daacca4 Binary files /dev/null and b/src/Assets/images/character1.webp differ diff --git a/src/Assets/images/character2.png b/src/Assets/images/character2.png deleted file mode 100644 index 080d46bd..00000000 Binary files a/src/Assets/images/character2.png and /dev/null differ diff --git a/src/Assets/images/character2.webp b/src/Assets/images/character2.webp new file mode 100644 index 00000000..6c617ef3 Binary files /dev/null and b/src/Assets/images/character2.webp differ diff --git a/src/Assets/images/character3.png b/src/Assets/images/character3.png deleted file mode 100644 index ca7f3db7..00000000 Binary files a/src/Assets/images/character3.png and /dev/null differ diff --git a/src/Assets/images/character3.webp b/src/Assets/images/character3.webp new file mode 100644 index 00000000..bf9bc2d0 Binary files /dev/null and b/src/Assets/images/character3.webp differ diff --git a/src/Assets/images/character4.png b/src/Assets/images/character4.png deleted file mode 100644 index c82fc6fc..00000000 Binary files a/src/Assets/images/character4.png and /dev/null differ diff --git a/src/Assets/images/character4.webp b/src/Assets/images/character4.webp new file mode 100644 index 00000000..faa3fb9b Binary files /dev/null and b/src/Assets/images/character4.webp differ diff --git a/src/Assets/images/logo.png b/src/Assets/images/logo.png deleted file mode 100644 index 8613d00f..00000000 Binary files a/src/Assets/images/logo.png and /dev/null differ diff --git a/src/Assets/images/logo.webp b/src/Assets/images/logo.webp new file mode 100644 index 00000000..943f8881 Binary files /dev/null and b/src/Assets/images/logo.webp differ diff --git a/src/Assets/images/logo2.png b/src/Assets/images/logo2.png deleted file mode 100644 index f52a23ef..00000000 Binary files a/src/Assets/images/logo2.png and /dev/null differ diff --git a/src/Assets/images/logo2.webp b/src/Assets/images/logo2.webp new file mode 100644 index 00000000..fc76f6ac Binary files /dev/null and b/src/Assets/images/logo2.webp differ diff --git a/src/Assets/images/logo3.png b/src/Assets/images/logo3.png deleted file mode 100644 index 7fb566b9..00000000 Binary files a/src/Assets/images/logo3.png and /dev/null differ diff --git a/src/Assets/images/logo3.webp b/src/Assets/images/logo3.webp new file mode 100644 index 00000000..019950bb Binary files /dev/null and b/src/Assets/images/logo3.webp differ diff --git a/src/Assets/images/mobilebanner1.png b/src/Assets/images/mobilebanner1.png deleted file mode 100644 index e386b126..00000000 Binary files a/src/Assets/images/mobilebanner1.png and /dev/null differ diff --git a/src/Assets/images/mobilebanner1.webp b/src/Assets/images/mobilebanner1.webp new file mode 100644 index 00000000..e6a98f2d Binary files /dev/null and b/src/Assets/images/mobilebanner1.webp differ diff --git a/src/Assets/images/mobilebanner2.png b/src/Assets/images/mobilebanner2.png deleted file mode 100644 index 9640528a..00000000 Binary files a/src/Assets/images/mobilebanner2.png and /dev/null differ diff --git a/src/Assets/images/mobilebanner2.webp b/src/Assets/images/mobilebanner2.webp new file mode 100644 index 00000000..f7cbfb31 Binary files /dev/null and b/src/Assets/images/mobilebanner2.webp differ diff --git a/src/Assets/index.tsx b/src/Assets/index.tsx index b1444743..9fcef802 100644 --- a/src/Assets/index.tsx +++ b/src/Assets/index.tsx @@ -33,28 +33,26 @@ export { default as TwoWay } from './icons/twoway.svg?react'; export { default as PrevArrow } from './icons/prevArrow.svg?react'; export { default as NextArrow } from './icons/nextArrow.svg?react'; export { default as CreateStudy } from './icons/createstudy.svg?react'; +export { default as DefaultStudyThumbnail } from './icons/studyThumbnail.svg'; export { default as SearchRecruitment } from './icons/recruitment.svg?react'; // Logo -export { default as BlankLogo } from './images/blank-logo.png'; -export { default as Logo } from './images/logo.png'; -export { default as FooterLogo } from './images/logo2.png'; -export { default as UTLogo } from './images/logo3.png'; +export { default as BlankLogo } from './images/blank-logo.webp'; +export { default as Logo } from './images/logo.webp'; +export { default as FooterLogo } from './images/logo2.webp'; +export { default as UTLogo } from './images/logo3.webp'; // Character -export { default as NotFound } from './images/character1.png'; -export { default as LoginFail } from './images/character2.png'; -export { default as SignUpFail } from './images/character3.png'; -export { default as ErrorBoundaryImage } from './images/character4.png'; +export { default as NotFound } from './images/character1.webp'; +export { default as LoginFail } from './images/character2.webp'; +export { default as SignUpFail } from './images/character3.webp'; +export { default as ErrorBoundaryImage } from './images/character4.webp'; // Background -export { default as SignUpBackground } from './images/background.png'; +export { default as SignUpBackground } from './images/background.webp'; // Banner -export { default as Banner1 } from './images/banner1.png'; -export { default as Banner2 } from './images/banner2.png'; -export { default as MobileBanner1 } from './images/mobilebanner1.png'; -export { default as MobileBanner2 } from './images/mobilebanner2.png'; - -// Study -export { default as DefaultStudyThumbnail } from './icons/studyThumbnail.svg'; +export { default as Banner1 } from './images/banner1.webp'; +export { default as Banner2 } from './images/banner2.webp'; +export { default as MobileBanner1 } from './images/mobilebanner1.webp'; +export { default as MobileBanner2 } from './images/mobilebanner2.webp'; diff --git a/src/Components/Banner/CustomArrowBtn/index.tsx b/src/Components/Banner/CustomArrowBtn/index.tsx index 8210b1a9..6774ff93 100644 --- a/src/Components/Banner/CustomArrowBtn/index.tsx +++ b/src/Components/Banner/CustomArrowBtn/index.tsx @@ -12,7 +12,7 @@ export const CustomArrowBtn = ({ onClick, }: CustomArrowBtnprops & Pick) => { return ( - + {type === 'PREV' ? : } ); diff --git a/src/Components/RecruitmentCard/index.tsx b/src/Components/RecruitmentCard/index.tsx index 1d43698c..1dc8bf73 100644 --- a/src/Components/RecruitmentCard/index.tsx +++ b/src/Components/RecruitmentCard/index.tsx @@ -48,7 +48,12 @@ const RecruitmentCard = (recruitment: Recruitment) => { recruitment.stacks.map( (stack: Stack, idx) => idx < 5 && ( - + stack-image ), ) ) : ( diff --git a/src/utils/axios.ts b/src/utils/axios.ts index 55ed68fb..1ea75282 100644 --- a/src/utils/axios.ts +++ b/src/utils/axios.ts @@ -20,20 +20,20 @@ export const createClient = (config?: AxiosRequestConfig) => { return response; }, async (error: AxiosError) => { - console.log('axios response', error, error.response, error.response?.status); + // console.log('axios response', error, error.response, error.response?.status); if (error.response?.status === 400) { - console.log('400', error.response); + // console.log('400', error.response); } // 토큰이 만료된 경우 else if (error.response?.status === 401) { - console.log('401', error.response); + // console.log('401', error.response); try { const data = await logOut(); if (data) window.location.href = '/'; } catch (e) { - console.log(e); + // console.log(e); } } // Login Provider에서 에러 핸들링하도록 reject diff --git a/vite.config.ts b/vite.config.ts index 55213494..73d7ae16 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ import react from '@vitejs/plugin-react'; import * as path from 'path'; import mkcert from 'vite-plugin-mkcert'; import { VitePluginRadar } from 'vite-plugin-radar'; +import { analyzer } from 'vite-bundle-analyzer'; export default defineConfig({ plugins: [ @@ -20,6 +21,7 @@ export default defineConfig({ id: 'GTM-WLWBHQRJ', }, }), + analyzer(), ], resolve: { alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }], diff --git a/yarn.lock b/yarn.lock index 2a3484b1..1a5c123a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10302,6 +10302,11 @@ vfile@^6.0.0: unist-util-stringify-position "^4.0.0" vfile-message "^4.0.0" +vite-bundle-analyzer@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/vite-bundle-analyzer/-/vite-bundle-analyzer-0.10.5.tgz#a0fee795b9a57b8084ab4b68588a2c35f39d4fea" + integrity sha512-gxIFQ6ifoQjDXaVWJmXHwI2VEVqyz6FXHKicNpTe4Pr2MAka6NQVRcmgznziRzbl9rhMP0qIc5Be8PxfGXUhgQ== + vite-plugin-mkcert@^1.17.3: version "1.17.5" resolved "https://registry.yarnpkg.com/vite-plugin-mkcert/-/vite-plugin-mkcert-1.17.5.tgz#175f1a2a99c110fa87b2f2e6390b22656674a67b"