Commit 89ceb5ae authored by Lee Soobeom's avatar Lee Soobeom
Browse files

Merge remote-tracking branch 'origin/MK27' into develop

parents 0086b124 e1226523
...@@ -35,9 +35,7 @@ export default function Login() { ...@@ -35,9 +35,7 @@ export default function Login() {
setLoading(true); setLoading(true);
await login(user.email, user.password, () => { await login(user.email, user.password, () => {
navigate("/", { replace: true }); navigate("/", { replace: true });
}); });
// console.log("서버연결됬나요", res); // console.log("서버연결됬나요", res);
// console.log("로그인"); // console.log("로그인");
...@@ -106,13 +104,6 @@ export default function Login() { ...@@ -106,13 +104,6 @@ export default function Login() {
<button className="bg-white "> <button className="bg-white ">
<Link to="/signup">회원가입</Link> <Link to="/signup">회원가입</Link>
</button> </button>
<div className="grid grid-cols-2 divide-x-2">
<div></div>
<div></div>
</div>
<button className="bg-white">
<Link to="/forgot">비밀번호 찾기</Link>
</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -68,78 +68,86 @@ export default function Profile() { ...@@ -68,78 +68,86 @@ export default function Profile() {
}, []); }, []);
return ( return (
<div className="grid "> <div className="grid bg-white rounded shadow-lg mb-5">
<form className="" onSubmit={handleSubmit}> <form className="mx-24 " onSubmit={handleSubmit}>
<div className=" mt-10 text-2xl">프로필 수정</div> <div className=" mt-7 text-2xl">프로필 수정</div>
<div className="grid mt-10 border-0 border-y-2 border-gray-400 "> <div className=" mt-10 border-0 border-y-2 border-gray-400">
<div className="flex h-20"> <div className="flex h-20">
<div className=" basis-1/5 border-0 border-r-2 bg-gray-100 grid place-items-center shrink-0"> <div className="w-24 border-0 border-r-2 bg-gray-100 grid place-items-center whitespace-nowrap">
Email Email
</div> </div>
<div className=" basis-full grid place-items-center justify-items-stretch px-4"> <div className=" grid place-items-center px-4 whitespace-nowrap">
{email} {email}
</div> </div>
</div> </div>
<div className="flex border-0 border-t-2"> <div className="flex border-0 border-t-2">
<div className="basis-1/5 border-0 border-r-2 bg-gray-100 grid place-items-center shrink-0"> <div className="w-24 border-0 border-r-2 bg-gray-100 grid place-items-center whitespace-nowrap">
사진 사진
</div> </div>
<div className="basis-full py-4 "> <div className="flex py-4 ">
<div className="overflow-hidden w-28 h-28 rounded-full border-2 mx-3 mb-3"> <div className="">
{imageSrc ? ( <div className="overflow-hidden w-28 h-28 rounded-full border-2 mx-3 mb-3">
<img {imageSrc ? (
src={imageSrc}
className="object-cover object-center h-full"
/>
) : (
avatarUrl && (
<img <img
src={"http://localhost:3000/images/" + avatarUrl} src={imageSrc}
className="object-cover object-center h-full" className="object-cover object-center h-full"
/> />
) ) : (
)} avatarUrl && (
<img
src={"http://localhost:3000/images/" + avatarUrl}
className="object-cover object-center h-full"
/>
)
)}
</div>
<input
type="file"
name="avatar"
id="avatar"
className="hidden"
onChange={handleChange}
></input>
<label
htmlFor="avatar"
className="border-2 m-5 whitespace-nowrap "
>
이미지 선택
</label>
</div>
<div className="pl-10 flex place-self-center text-gray-400 text-sm whitespace-nowrap">
{"<새로운 이미지를 넣어보세요!>"}
</div> </div>
<input
type="file"
name="avatar"
id="avatar"
className="hidden"
onChange={handleChange}
></input>
<label htmlFor="avatar" className="border-2 m-5">
이미지 선택
</label>
</div> </div>
</div> </div>
<div className="flex border-0 border-t-2 h-20"> <div className="flex border-0 border-t-2 h-20">
<div className="basis-1/5 border-0 border-r-2 bg-gray-100 grid place-items-center shrink-0"> <div className="w-24 border-0 border-r-2 bg-gray-100 grid place-items-center whitespace-nowrap">
이름 이름
</div> </div>
<input <input
name="name" name="name"
placeholder={profile.name} placeholder={profile.name}
className="basis-1/5 placeholder:text-black my-6 ml-5 border-2 " className=" placeholder:text-black my-6 ml-5 border-2 "
onChange={handleChange} onChange={handleChange}
/> />
</div> </div>
</div> </div>
<div className="flex md:mb-20 justify-center gap-x-3"> <div className="flex mb-5 justify-center gap-x-3">
<button <button
onClick={handleSubmit} onClick={handleSubmit}
className=" mt-5 h-12 w-40 border-2 border-blue-400 text-lg place-self-center" className=" mt-5 h-12 w-1/5 border-2 border-blue-400 text-lg place-self-center whitespace-nowrap"
> >
저장하기 저장하기
</button> </button>
<button className=" mt-5 h-12 w-40 text-lg border-2 border-orange-400 place-self-center"> <button className=" mt-5 h-12 w-1/5 text-lg border-2 border-orange-400 place-self-center whitespace-nowrap">
<Link to="/">취소</Link> <Link to="/">취소</Link>
</button> </button>
<button <button
type="button" type="button"
onClick={onDelete} onClick={onDelete}
className=" mt-5 h-12 w-40 text-lg border-2 border-red-400 place-self-center" className=" mt-5 h-12 w-1/5 text-lg border-2 border-red-400 place-self-center whitespace-nowrap"
> >
계정 삭제 계정 삭제
</button> </button>
......
...@@ -72,7 +72,7 @@ export default function Body() { ...@@ -72,7 +72,7 @@ export default function Body() {
src={ src={
"http://localhost:3000/images/" + picture.fileInfo.newfilename "http://localhost:3000/images/" + picture.fileInfo.newfilename
} }
className="w-full h-48 object-cover hover:scale-110 transition duration-0 hover:duration-500" className="w-full h-44 object-cover hover:scale-110 transition duration-0 hover:duration-500"
/> />
<div className="bg-transparent text-neutral-50 text-xs md:text-lg rounded-full absolute bottom-0 ml-1 mb-1 hover:scale-110 transition duration-0 hover:duration-500"> <div className="bg-transparent text-neutral-50 text-xs md:text-lg rounded-full absolute bottom-0 ml-1 mb-1 hover:scale-110 transition duration-0 hover:duration-500">
<span>{picture.title}</span> <span>{picture.title}</span>
......
...@@ -14,8 +14,8 @@ export default function Header() { ...@@ -14,8 +14,8 @@ export default function Header() {
}; };
// bg-gradient-to-t from-sky-200 // bg-gradient-to-t from-sky-200
return ( return (
<div className="flex flex-col "> <div className="flex flex-col bg-lime-100">
<div className="flex flex-col md:px-56 z-10 "> <div className="flex flex-col md:px-14 lg:px-52 z-10 ">
<div className="flex flex-col-reverse pt-3 pb-12 "> <div className="flex flex-col-reverse pt-3 pb-12 ">
<div className="flex mt-5 justify-between pr-3"> <div className="flex mt-5 justify-between pr-3">
<button className="ml-3 shrink-0 md:text-2xl"> <button className="ml-3 shrink-0 md:text-2xl">
...@@ -44,7 +44,11 @@ export default function Header() { ...@@ -44,7 +44,11 @@ export default function Header() {
</Link> </Link>
<div className="border-0 border-r-2 border-black "></div> <div className="border-0 border-r-2 border-black "></div>
{user.role === "admin" ? ( {user.role === "admin" ? (
<Link to={"/admin"}>어드민</Link> <div className="border-0 border-r-2 border-black ">
<Link to={"/admin"} className="mx-2">
관리자
</Link>
</div>
) : null} ) : null}
<button <button
className="ml-2 text-xs" className="ml-2 text-xs"
......
import React, { MouseEventHandler, useState } from "react"; import React, { MouseEventHandler, useEffect, useState } from "react";
type ThemeProps = { type ThemeProps = {
handleClick: MouseEventHandler; handleClick: MouseEventHandler;
...@@ -15,7 +15,7 @@ export default function Theme({ handleClick }: ThemeProps) { ...@@ -15,7 +15,7 @@ export default function Theme({ handleClick }: ThemeProps) {
}; };
return ( return (
<div className="overflow-x-auto flex rounded py-2 md:p-4 shadow-lg divide-x-2 bg-white"> <div className=" overflow-x-auto flex rounded py-2 md:py-4 md:pl-3 shadow-lg divide-x-2 bg-white">
<div onClick={() => clickActive(1)}> <div onClick={() => clickActive(1)}>
<button <button
id={"surfing"} id={"surfing"}
......
...@@ -16,10 +16,7 @@ export default function Citylist({ handleClick }: CityProps) { ...@@ -16,10 +16,7 @@ export default function Citylist({ handleClick }: CityProps) {
}; };
return ( return (
<div className="overflow-auto w-full md:w-36 flex flex-row md:flex-col md:mr-24 bg-lime-100 shadow-lg"> <div className="overflow-auto w-full md:w-36 bg-white flex flex-row md:flex-col md:mr-24 shadow-lg">
{/* <div className="text-start px-5 py-2 bg-white whitespace-nowrap">
도시
</div> */}
<div onClick={() => clickActive(1)}> <div onClick={() => clickActive(1)}>
<button <button
id={"Seoul"} id={"Seoul"}
......
...@@ -12,7 +12,6 @@ app.use(cookieParser()); ...@@ -12,7 +12,6 @@ app.use(cookieParser());
app.use("/api", router); app.use("/api", router);
app.use("/images", express.static(path.join(__dirname, "..", "/uploads"))); app.use("/images", express.static(path.join(__dirname, "..", "/uploads")));
app.use("/images", express.static(path.join(__dirname, "..", "/adminpics")));
app.use((err: any, req: Request, res: Response, next: NextFunction) => { app.use((err: any, req: Request, res: Response, next: NextFunction) => {
console.log("익스프레스 에러: ", err); console.log("익스프레스 에러: ", err);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment