diff --git a/src/pages/StartView/StartView.module.css b/src/pages/StartView/StartView.module.css
index 68cff5a..e0e8523 100644
--- a/src/pages/StartView/StartView.module.css
+++ b/src/pages/StartView/StartView.module.css
@@ -35,12 +35,15 @@
.logo{
background: no-repeat;
- width: 70px;
- height: 70px;
+
}
-
+ .today_logo{
+ width: 70px;
+ height: 70px;
+ }
+
.mess7{
padding-top: 20px;
diff --git a/src/pages/StartView/StartView.tsx b/src/pages/StartView/StartView.tsx
index 4494d78..e1b1956 100644
--- a/src/pages/StartView/StartView.tsx
+++ b/src/pages/StartView/StartView.tsx
@@ -1,23 +1,24 @@
import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
-import style from './StartView.module.css'
+import style from './StartView.module.css';
+import { getCategoryImg } from '../../functions/getCategory.ts';
interface EmotionIconProps {
type: number;
}
-export default function LoginView ({type}:EmotionIconProps): JSX.Element {
+export default function LoginView({ type }:EmotionIconProps): JSX.Element {
const navigation = useNavigate();
useEffect(() => {
- setTimeout(function () {
- navigation("/main");
- }, 3000);
+ setTimeout(() => {
+ navigation('/main');
+ }, 3000);
}, []);
- const userIcon = (emotionType:number): string =>{
- switch (emotionType){
+ const userIcon = (emotionType:number): string => {
+ switch (emotionType) {
case 1: return 'happy';
case 2: return 'sad';
case 3: return 'angry';
@@ -28,8 +29,8 @@ export default function LoginView ({type}:EmotionIconProps): JSX.Element {
}
};
- const userType = (emotionType:number): string =>{
- switch (emotionType){
+ const userType = (emotionType:number): string => {
+ switch (emotionType) {
case 1: return '오예';
case 2: return '뿌앵';
case 3: return '부글부글';
@@ -40,20 +41,22 @@ export default function LoginView ({type}:EmotionIconProps): JSX.Element {
}
};
- return(
-
-
-
-
-
-
-
-
오늘 내가 구운 쿠키는...
-
-
{userType(type)}머랭
-
-
+ return (
+
+
+
+
+
- )
-}
+
오늘 내가 구운 쿠키는...
+
+
+ {userType(type)}
+ 머랭
+
+
+
+
+ );
+}
diff --git a/src/pages/StickerView/StickerView.tsx b/src/pages/StickerView/StickerView.tsx
index ffc4d75..a898c9b 100644
--- a/src/pages/StickerView/StickerView.tsx
+++ b/src/pages/StickerView/StickerView.tsx
@@ -76,7 +76,7 @@ export default function StickerView() {
-
+
{toggleStickerButton ? (
{
setTodayDate(new Date());
fetchTodayPost();
- fetchUserNickname().then((nickname) => setUserName(nickname ?? ""));
+ fetchUserNickname().then((nickname) => setUserName(nickname ?? ''));
}, [currentDate, fetchTodayPost]);
if (!todayPost) {
@@ -122,7 +123,7 @@ function Mypage() {
diff --git a/src/utils/GetEmotionIcon.tsx b/src/utils/GetEmotionIcon.tsx
index 30bd34d..8d891b7 100644
--- a/src/utils/GetEmotionIcon.tsx
+++ b/src/utils/GetEmotionIcon.tsx
@@ -1,4 +1,10 @@
import s from '../components/EmotionList/EmotionList.module.css';
+import Happy from '../assets/moodIcons/happy.svg';
+import Sad from '../assets/moodIcons/sad.svg';
+import Angry from '../assets/moodIcons/angry.svg';
+import Upset from '../assets/moodIcons/upset.svg';
+import Simsim from '../assets/moodIcons/simsim.svg';
+import Tired from '../assets/moodIcons/tired.svg';
interface EmotionIconProps {
type: number;
@@ -8,24 +14,24 @@ function GetEmotionIcon({ type }: EmotionIconProps): JSX.Element {
const getEmotionIcon = (emotion: number): string => {
switch (emotion) {
case 1:
- return 'happy';
+ return Happy;
case 2:
- return 'sad';
+ return Sad;
case 3:
- return 'angry';
+ return Angry;
case 4:
- return 'upset';
+ return Upset;
case 5:
- return 'simsim';
+ return Simsim;
case 6:
- return 'tired';
+ return Tired;
default:
return '';
}
};
return (
diff --git a/vite.config.ts b/vite.config.ts
index 861b04b..4d2874e 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,7 +1,22 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
+import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
+ publicDir: path.resolve(__dirname, "src/assets"),
+ experimental: {
+ renderBuiltUrl(filename: string, { hostId, hostType, type }: { hostId: string, hostType: 'js' | 'css' | 'html', type: 'public' | 'asset' }) {
+ if (type === 'public') {
+ return 'https://keepgoinglikelion.github.io/meringue-FE/' + filename
+ }
+ else if (path.extname(hostId) === '.js') {
+ return { runtime: `window.__assetsPath(${JSON.stringify(filename)})` }
+ }
+ else {
+ return 'https://keepgoinglikelion.github.io/meringue-FE/' + filename
+ }
+ }
+ }
})
diff --git a/yarn.lock b/yarn.lock
index 3b09faa..c6c7f0b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -59,10 +59,10 @@
resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz"
integrity sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==
-"@esbuild/win32-x64@0.19.11":
+"@esbuild/darwin-arm64@0.19.11":
version "0.19.11"
- resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz"
- integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==
+ resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz"
+ integrity sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
@@ -141,15 +141,15 @@
resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.14.2.tgz"
integrity sha512-ACXpdMM9hmKZww21yEqWwiLws/UPLhNKvimN8RrYSqPSvB3ov7sLvAcfvaxePeLvccTQKGdkDIhLYApZVDFuKg==
-"@rollup/rollup-win32-x64-msvc@4.10.0":
+"@rollup/rollup-darwin-arm64@4.10.0":
version "4.10.0"
- resolved "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.10.0.tgz"
- integrity sha512-OZoJd+o5TaTSQeFFQ6WjFCiltiYVjIdsXxwu/XZ8qRpsvMQr4UsVrE5UyT9RIvsnuF47DqkJKhhVZ2Q9YW9IpQ==
+ resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.10.0.tgz"
+ integrity sha512-uFpayx8I8tyOvDkD7X6n0PriDRWxcqEjqgtlxnUA/G9oS93ur9aZ8c8BEpzFmsed1TH5WZNG5IONB8IiW90TQg==
-"@swc/core-win32-x64-msvc@1.3.103":
+"@swc/core-darwin-arm64@1.3.103":
version "1.3.103"
- resolved "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.103.tgz"
- integrity sha512-/1RvaOmZolXurWAUdnELYynVlFUiT0hj3PyTPoo+YK6+KV7er4EqUalRsoUf3zzGepQuhKFZFDpQn6Xi9kJX1A==
+ resolved "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.103.tgz"
+ integrity sha512-Dqqz48mvdm/3PHPPA6YeAEofkF9H5Krgqd/baPf0dXcarzng6U9Ilv2aCtDjq7dfI9jfkVCW5zuwq98PE2GEdw==
"@swc/core@^1.3.96":
version "1.3.103"
@@ -200,6 +200,13 @@
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
+"@types/node@^18.0.0 || >=20.0.0", "@types/node@^20.11.19":
+ version "20.11.19"
+ resolved "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz"
+ integrity sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==
+ dependencies:
+ undici-types "~5.26.4"
+
"@types/prop-types@*":
version "15.7.11"
resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz"
@@ -1171,6 +1178,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
+fsevents@~2.3.2, fsevents@~2.3.3:
+ version "2.3.3"
+ resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
+
function-bind@^1.1.1, function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
@@ -2396,6 +2408,11 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"
+undici-types@~5.26.4:
+ version "5.26.5"
+ resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
+
unload@2.2.0:
version "2.2.0"
resolved "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz"