Skip to content

Commit e1ea82f

Browse files
committed
chore: width, maxWidth 설정 추가
-반응형 최대 너비 680px -기본 너비 100%
1 parent b6edfad commit e1ea82f

File tree

3 files changed

+2189
-37
lines changed

3 files changed

+2189
-37
lines changed

src/pages/HomePage/HomePage.tsx

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import React,{ useEffect, useState } from 'react';
2-
import Header from "./component/Header";
1+
import React, { useEffect, useState } from 'react';
2+
import Header from './component/Header';
33
import { useNavigate } from 'react-router-dom';
4-
import SearchBar from "./component/SearchBar";
5-
import IntegratedRanking from "./component/IntegratedRanking";
6-
import LiveDiscussion from "./component/LiveDiscussion";
7-
import CommunityRanking from "./component/CommunityRanking";
8-
import GreetingMessage from "./component/GreetingMessage";
9-
import logo from "@images/etc/logo.png";
10-
import victory_banner from "@images/victory_banner.png";
4+
import SearchBar from './component/SearchBar';
5+
import IntegratedRanking from './component/IntegratedRanking';
6+
import LiveDiscussion from './component/LiveDiscussion';
7+
import CommunityRanking from './component/CommunityRanking';
8+
import GreetingMessage from './component/GreetingMessage';
9+
import logo from '@images/etc/logo.png';
10+
import victory_banner from '@images/victory_banner.png';
1111

1212
const HomePage = () => {
1313
// 여기에 실제 로그인 상태를 확인하는 로직을 추가해야 함 -> 추가함
1414
const [isLoggedIn, setIsLoggedIn] = useState<boolean>(false);
1515
const navigate = useNavigate();
1616

1717
useEffect(() => {
18-
const token = localStorage.getItem('accessToken');
18+
const token = localStorage.getItem('accessToken');
1919
if (token) {
2020
setIsLoggedIn(true);
2121
} else {
@@ -28,7 +28,7 @@ const HomePage = () => {
2828
};
2929

3030
return (
31-
<div className="bg-background w-[390px] mx-auto scrollbar-hidden">
31+
<div className="bg-background w-custom max-w-custom mx-auto scrollbar-hidden">
3232
<Header isLoggedIn={isLoggedIn} />
3333
<GreetingMessage isLoggedIn={isLoggedIn} />
3434
<div className="flex items-center ml-[24px] mr-[24px] mt-4">
@@ -37,10 +37,14 @@ const HomePage = () => {
3737
</div>
3838
<IntegratedRanking />
3939
<LiveDiscussion />
40-
<img src={victory_banner} alt="victory_banner" className="w-[390px] mx-auto mt-[40px] px-[20px]" />
41-
<CommunityRanking/>
40+
<img
41+
src={victory_banner}
42+
alt="victory_banner"
43+
className="w-[100%] mt-[40px] px-[20px]"
44+
/>
45+
<CommunityRanking />
4246
</div>
4347
);
44-
}
48+
};
4549

4650
export default HomePage;

tailwind.config.js

+26-23
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,50 @@
1010
/** @type {import('tailwindcss').Config} */
1111
// eslint-disable-next-line no-undef
1212
module.exports = {
13-
content: [
14-
"./index.html",
15-
"./src/**/*.{js,ts,jsx,tsx}",
16-
],
13+
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
1714
theme: {
1815
extend: {
1916
boxShadow: {
2017
'custom-purple': '0px 0px 10px 0px rgba(118, 32, 228, 0.40)',
2118
},
2219
fontFamily: {
23-
'pretendard': ['Pretendard', 'sans-serif']
20+
pretendard: ['Pretendard', 'sans-serif'],
2421
},
2522
colors: {
26-
'point100': '#F1E6FF',
27-
'point200': '#D6B8FB',
28-
'point300': '#BA8CF5',
29-
'point400': '#914CE9',
30-
'point500': '#7620E4',
31-
'errorpoint': '#FF4A4A',
32-
'white': '#FFFFFF',
33-
'background': '#F8F9FC',
34-
'gray1': '#EDF0F3',
35-
'gray2' : '#CED5DB',
36-
'gray3': '#9EAAB5',
37-
'gray4': '#797F85',
38-
'gray5': '#464F59',
39-
'black': '#1D2228',
23+
point100: '#F1E6FF',
24+
point200: '#D6B8FB',
25+
point300: '#BA8CF5',
26+
point400: '#914CE9',
27+
point500: '#7620E4',
28+
errorpoint: '#FF4A4A',
29+
white: '#FFFFFF',
30+
background: '#F8F9FC',
31+
gray1: '#EDF0F3',
32+
gray2: '#CED5DB',
33+
gray3: '#9EAAB5',
34+
gray4: '#797F85',
35+
gray5: '#464F59',
36+
black: '#1D2228',
37+
},
38+
maxWidth: {
39+
custom: '680px', //반응형 최대 너비
40+
},
41+
width: {
42+
custom: '100%', //항상 화면 꽉 채우기
4043
},
4144
},
4245
},
4346
plugins: [
4447
function ({ addUtilities }) {
4548
addUtilities({
4649
'.scrollbar-hide': {
47-
'-ms-overflow-style': 'none', /* IE and Edge */
48-
'scrollbar-width': 'none', /* Firefox */
50+
'-ms-overflow-style': 'none' /* IE and Edge */,
51+
'scrollbar-width': 'none' /* Firefox */,
4952
'&::-webkit-scrollbar': {
50-
display: 'none', /* Chrome, Safari, Opera */
53+
display: 'none' /* Chrome, Safari, Opera */,
5154
},
5255
},
5356
});
5457
},
5558
],
56-
}
59+
};

0 commit comments

Comments
 (0)