Skip to content
Snippets Groups Projects
Commit c70ffee6 authored by 이권민's avatar 이권민
Browse files

[EDIT] CSS

parents 2fb6c5fd e6b8aeec
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
"start": "export PORT=3001 && react-scripts start", "start": " react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
......
...@@ -19,17 +19,20 @@ const CalendarWeek = ({ ...@@ -19,17 +19,20 @@ const CalendarWeek = ({
const [schedule, setSchedule] = useState({}); const [schedule, setSchedule] = useState({});
const parseTime = (time) => { const parseTime = (time) => {
// 자정("00:00:00")을 확인하여 48을 반환
if (time === "00:00:00") { if (time === "00:00:00") {
return 48; return 0;
} }
const [hours, minutes] = time.split(":").map(Number); const [hours, minutes] = time.split(":").map(Number);
return hours * 2 + (minutes >= 30 ? 1 : 0); // 30분 단위로 계산 return hours * 2 + (minutes >= 30 ? 1 : 0); // 30분 단위로 계산
}; };
const startTimeSlot = parseTime(availableVotingStartTime); let startTimeSlot = parseTime(availableVotingStartTime);
const endTimeSlot = parseTime(availableVotingEndTime); let endTimeSlot = parseTime(availableVotingEndTime);
if (availableVotingEndTime === "00:00:00") {
endTimeSlot = 47;
}
const handlePrevWeek = () => { const handlePrevWeek = () => {
setCurrentWeekIndex(Math.max(0, currentWeekIndex - 1)); setCurrentWeekIndex(Math.max(0, currentWeekIndex - 1));
......
...@@ -18,14 +18,14 @@ function HomeMakeForm() { ...@@ -18,14 +18,14 @@ function HomeMakeForm() {
const handleSubmit = (event) => { const handleSubmit = (event) => {
event.preventDefault(); event.preventDefault();
navigate("/MeetingInfo", {state : {title, password}}); navigate("/MeetingInfo", { state: { title, password } });
}; };
const isFormValid = title.trim() !== "" && password.trim() !== ""; const isFormValid = title.trim() !== "" && password.trim() !== "";
return ( return (
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<div className="system-name">언제모임?</div>
<div className="center-container"> <div className="center-container">
<div className="system-name">언제모임?</div>
<h1>원하는 약속을 만들어보세요</h1> <h1>원하는 약속을 만들어보세요</h1>
<Input <Input
type="text" type="text"
......
...@@ -187,7 +187,7 @@ function HomeParticipateForm() { ...@@ -187,7 +187,7 @@ function HomeParticipateForm() {
<form> <form>
<div> <div>
<h1>투표에 참여하기</h1> <h1>투표에 참여하기</h1>
<h2> 아이디가 없다면 아래 양식에 맞춰 작성 참여하기를 누르세요</h2> <h2 className="h2"> 아이디가 없다면 아래 양식에 맞춰 작성 참여하기를 누르세요</h2>
<Input <Input
type="text" type="text"
value={name} value={name}
......
...@@ -90,7 +90,7 @@ function MeetingInfoForm() { ...@@ -90,7 +90,7 @@ function MeetingInfoForm() {
}; };
return ( return (
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<div className="center-container"> <div className="center-container2">
<h1>약속 일정 만들기</h1> <h1>약속 일정 만들기</h1>
<div className="purpose"> <div className="purpose">
<h2 className="not-enter">약속 목적 </h2> <h2 className="not-enter">약속 목적 </h2>
......
...@@ -4,7 +4,7 @@ import '../styles/MeetingInfo.css' ...@@ -4,7 +4,7 @@ import '../styles/MeetingInfo.css'
function MeetingInfo() { function MeetingInfo() {
return ( return (
<div className="center-container"> <div>
<MeetingInfoForm /> <MeetingInfoForm />
</div> </div>
); );
......
...@@ -27,9 +27,10 @@ h1 { ...@@ -27,9 +27,10 @@ h1 {
.center-container { .center-container {
display: flex; display: flex;
flex-direction: column; /* 세로 방향으로 정렬 */ flex-direction: column;
align-items: center; align-items: center;
height: 100vh; justify-content: center; /* Add this line to center vertically */
min-height: 100vh;
} }
input { input {
......
h2 { h2.h2{
font-size: 12px; font-size: 12px;
font-weight: lighter; font-weight: lighter;
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ body { ...@@ -9,7 +9,7 @@ body {
padding: 0px; padding: 0px;
} }
.center-container { .center-container2 {
display: flex; display: flex;
flex-direction: column; /* 세로 방향으로 정렬 */ flex-direction: column; /* 세로 방향으로 정렬 */
align-items: center; align-items: center;
......
...@@ -44,12 +44,22 @@ ...@@ -44,12 +44,22 @@
align-items: center; align-items: center;
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.flex-bottom-container {
display: flex;
justify-content: space-between;
width: 100%;
bottom: 0;
left: 0;
}
.mostTime,
.possible { .possible {
position: static; position: relative;
width: 40%; width: 40%;
margin: 200px 20px; margin: 200px 20px;
height: 40%;
} }
.flex-row { .flex-row {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
......
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.mostTime {
position: relative;
top: 200px;
}
.flex-bottom-container { .flex-bottom-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -64,11 +68,11 @@ ...@@ -64,11 +68,11 @@
left: 0; left: 0;
} }
.mostTime,
.possible { .possible {
position: static; position: static;
width: 40%; width: 40%;
margin: 200px 20px; margin: 200px 20px;
height: 40%;
} }
.flex-row { .flex-row {
flex-direction: column; flex-direction: column;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment