Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
feat :: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyun0220 committed Aug 27, 2024
1 parent c0c63b2 commit 3f38357
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 37 deletions.
16 changes: 8 additions & 8 deletions crescendo-web/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import Counsel from "./pages/Counsel";
import Board from "./pages/Board";

const App = () => {
const [isModalOpen, setIsModalOpen] = useState(false);
const openModal = () => {
setIsModalOpen(true);
};
// const [isModalOpen, setIsModalOpen] = useState(false);
// const openModal = () => {
// setIsModalOpen(true);
// };
// 모달 닫기 함수
const closeModal = () => {
setIsModalOpen(false);
};
// const closeModal = () => {
// setIsModalOpen(false);
// };

const [formData, setFormData] = useState({
id: "",
password: "",
Expand Down
12 changes: 0 additions & 12 deletions crescendo-web/src/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ function Login() {
setLoginData({ ...loginData, [e.target.name]: e.target.value });
};

const handleLogin = async () => {
try {
const response = await axios.post("https://sh-crescendo-server.azurewebsites.net/auth/login", loginData);

if (response.status === 200) {
navigate("/Main");
} else {
console.error("Login failed");
}
} catch (error) {
console.error("There was an error during the login process:", error);
}
};

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion crescendo-web/src/pages/Counsel.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Counsel() {
<input id="counselorBtn" type="button" value="상담사" />
</div>
<div className="var-container">
<img id="banner" src={require("../image/banner.png")} width="440px" />
<img id="banner" src={require("../image/banner.png")} width="440px" alt="banner" />
</div>
<div className="chatList">
<input id="user1" type="button" />
Expand Down
28 changes: 14 additions & 14 deletions crescendo-web/src/pages/Guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import React from "react";
import "./Guide.css";
import { useNavigate } from "react-router-dom";

function Modal({ isOpen, onClose }) {
// 모달이 열려 있을 때만 내용이 렌더링됩니다.
if (!isOpen) return null;
return (
<div>
<div>
<h2>팝업창</h2>
<p>이것은 팝업창입니다.</p>
<button onClick={onClose}>닫기</button>
</div>
</div>
);
}
// function Modal({ isOpen, onClose }) {
// // 모달이 열려 있을 때만 내용이 렌더링됩니다.
// if (!isOpen) return null;
// return (
// <div>
// <div>
// <h2>팝업창</h2>
// <p>이것은 팝업창입니다.</p>
// <button onClick={onClose}>닫기</button>
// </div>
// </div>
// );
// }

// 토글 버튼을 렌더링하는 컴포넌트
function Toggles() {
Expand Down Expand Up @@ -80,7 +80,7 @@ function Guide() {
<img src={require("../image/6.png")} alt="step 6" />
</button>
</div>
<img src={require("../image/7.png")} className="p7"/>
<img src={require("../image/7.png")} className="p7" alt="7"/>
<Toggles />
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions crescendo-web/src/pages/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ function Main() {
return (
<div className="container">
<div className="box"></div>
<img src={require("../image/var.png")} width="440px" className="var" />
<img src={require("../image/var.png")} width="440px" className="var" alt="var"/>

{/* 검색창 (유지) */}
<input className="text" placeholder="검색어를 입력하세요" />

<h4>오늘의 추천 Todo 🔥</h4>
<img src={require("../image/onedayClass.png")} className="Todo" />
<img src={require("../image/onedayClass.png")} className="Todo" alt="onedayClass"/>

<h5>My Todo</h5>
<div className="underline"></div>
Expand Down

0 comments on commit 3f38357

Please sign in to comment.