diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index a1e4524..28ffeaa 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -13,6 +13,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'prettier',
+ 'plugin:react-hooks/recommended',
],
overrides: [
{
diff --git a/package.json b/package.json
index 4859c4d..a00f670 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
"stylelint-config-standard": "^36.0.1",
"stylelint-order": "^6.0.4",
"terser": "^5.31.1",
- "typescript": "^5.2.2",
+ "typescript": "^5.5.4",
"vite": "^5.3.1",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4deeff8..0ba6160 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -97,7 +97,7 @@ importers:
specifier: ^5.31.1
version: 5.31.3
typescript:
- specifier: ^5.2.2
+ specifier: ^5.5.4
version: 5.5.4
vite:
specifier: ^5.3.1
diff --git a/src/components/MenuBar.tsx b/src/components/MenuBar.tsx
index 1132fb5..b615283 100644
--- a/src/components/MenuBar.tsx
+++ b/src/components/MenuBar.tsx
@@ -1,5 +1,5 @@
import { css } from '@emotion/react';
-import { useState } from 'react';
+import { memo, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import {
@@ -20,7 +20,7 @@ const PATH_MATCH = [
{ url: '/mypage', name: '마이', icon: },
];
-const MenuBar = () => {
+const MenuBar = memo(() => {
const { pathname } = useLocation();
const firstPathname = `/${pathname.split('/')[1]}`;
const navigate = useNavigate();
@@ -67,7 +67,9 @@ const MenuBar = () => {
{activateModal && }
>
);
-};
+});
+
+MenuBar.displayName = 'MenuBar';
export default MenuBar;
@@ -75,6 +77,7 @@ const navCss = css`
display: flex;
position: fixed;
bottom: 1.6rem;
+ z-index: 999;
width: 100vw;
`;
diff --git a/src/components/PageLoading.tsx b/src/components/PageLoading.tsx
index 5992ccc..66bca8a 100644
--- a/src/components/PageLoading.tsx
+++ b/src/components/PageLoading.tsx
@@ -1,18 +1,9 @@
import { css } from '@emotion/react';
-import { useEffect } from 'react';
import { WhiteSpinnerGIF } from '@/assets/image';
import { COLORS, FONTS } from '@/styles/constants';
const PageLoading = () => {
- useEffect(() => {
- // 스크롤 방지
- document.body.style.overflow = 'hidden';
-
- return () => {
- document.body.style.overflow = 'auto';
- };
- }, []);
return (
@@ -32,10 +23,10 @@ const dataContainer = css`
top: 0;
z-index: 999;
- width: 100dvw;
width: 100%;
- height: 100dvh;
+ width: 100dvw;
height: 100%;
+ height: 100dvh;
background-color: rgb(82 82 82 / 72%);
`;
diff --git a/src/components/PlaceCard.tsx b/src/components/PlaceCard.tsx
index eaeb52a..3927867 100644
--- a/src/components/PlaceCard.tsx
+++ b/src/components/PlaceCard.tsx
@@ -10,6 +10,7 @@ import {
import { COLORS, FONTS } from '@/styles/constants';
interface PlaceCardProps {
+ idx: number;
placeName: string;
address: string;
imgSrc: string;
@@ -30,6 +31,7 @@ interface PlaceCardProps {
const PlaceCard = (props: PlaceCardProps) => {
const {
+ idx,
placeName,
address,
imgSrc,
@@ -47,7 +49,13 @@ const PlaceCard = (props: PlaceCardProps) => {
};
return (
-
+
+
10 ? 'lazy' : 'eager'}
+ css={imgCss}
+ />