-
-
-
-
-
-
-
-
-
-
-
+
+
clickActive(1)}>
+
+
+
clickActive(2)}>
+
+
+
clickActive(3)}>
+
+
+
clickActive(4)}>
+
+
+
clickActive(5)}>
+
+
+
clickActive(6)}>
+
+
+
clickActive(7)}>
+
+
+
clickActive(8)}>
+
+
+
clickActive(9)}>
+
+
+
clickActive(10)}>
+
+
+
clickActive(11)}>
+
+
);
}
diff --git a/frontend/src/pages/citylist.tsx b/frontend/src/pages/citylist.tsx
index a6fa3de76f845f0c3d986759106542e28f1e94d0..7f498db54a301099f1b5df42b8b8e123bd9110c6 100644
--- a/frontend/src/pages/citylist.tsx
+++ b/frontend/src/pages/citylist.tsx
@@ -1,86 +1,114 @@
-import React, { MouseEventHandler } from "react";
+import React, { MouseEventHandler, useState } from "react";
type CityProps = {
handleClick: MouseEventHandler;
};
export default function Citylist({ handleClick }: CityProps) {
+ const [active, setActive] = useState(0);
+
+ const onactive = "text-start px-5 py-2 underline whitespace-nowrap";
+ const offactive = "text-start px-5 py-2 whitespace-nowrap";
+
+ const clickActive = (a: number) => {
+ setActive(a);
+ };
+
return (
도시
-
-
-
-
-
-
-
-
-
-
- {/* citylist */}
+
clickActive(1)}>
+
+
+
clickActive(2)}>
+
+
+
clickActive(3)}>
+
+
+
clickActive(4)}>
+
+
+
clickActive(5)}>
+
+
+
clickActive(6)}>
+
+
+
clickActive(7)}>
+
+
+
clickActive(8)}>
+
+
+
clickActive(9)}>
+
+
+
clickActive(10)}>
+
+
// Citylist Page
);
diff --git a/frontend/src/types/index.tsx b/frontend/src/types/index.tsx
index a4617babb5c9a57d4a569a1f07c2bc3f06ff91b2..48ee863c6a3aa2d3c7a94d337b9530fee6e8462f 100644
--- a/frontend/src/types/index.tsx
+++ b/frontend/src/types/index.tsx
@@ -39,7 +39,8 @@ export interface SignupUser {
export interface Profile {
_id: string;
email: string;
- fileInfo: {
+ name: string;
+ avatar: {
originalfilename: string;
newfilename: string;
picturepath: string;
diff --git a/src/controllers/fileinfo.controller.ts b/src/controllers/fileinfo.controller.ts
index a3d1c435950c8bc3dc95028830431aaab84f38f6..330b21c0cef35c7f1b42cf6cbd459ca5c6a989ac 100644
--- a/src/controllers/fileinfo.controller.ts
+++ b/src/controllers/fileinfo.controller.ts
@@ -4,7 +4,11 @@ import { TypedRequest } from "../types";
export const uploadFile = asyncWrap(async (reqExp, res, next) => {
const req = reqExp as TypedRequest;
- const form = formidable({ multiples: false, uploadDir: "uploads" });
+ const form = formidable({
+ multiples: false,
+ uploadDir: "uploads",
+ keepExtensions: true,
+ });
await new Promise((resolve, reject) => {
form.parse(req, (err, fields, files) => {
@@ -25,7 +29,11 @@ export const uploadFile = asyncWrap(async (reqExp, res, next) => {
export const uploadFiles = asyncWrap(async (reqExp, res, next) => {
const req = reqExp as TypedRequest;
- const form = formidable({ multiples: true, uploadDir: "uploads" });
+ const form = formidable({
+ multiples: true,
+ uploadDir: "uploads",
+ keepExtensions: true,
+ });
await new Promise((resolve, reject) => {
form.parse(req, (err, fields, files) => {
diff --git a/src/db/index.ts b/src/db/index.ts
index b714af5b043b5377b84b3ba8e213d349e63d09a8..b4f157f405dc90a9f347269d84915fbe69e0bb93 100644
--- a/src/db/index.ts
+++ b/src/db/index.ts
@@ -1,4 +1,4 @@
export * as roleDb from "./role.db";
export * as postDb from "./post.db";
export * as userDb from "./user.db";
-export * as mainimgDb from "./mainimg.db"
\ No newline at end of file
+export * as mainimgDb from "./mainimg.db";