Commit 05a1c8a9 authored by Lee Soobeom's avatar Lee Soobeom
Browse files

PostType click 삭제

parent 63a67026
import React, { useState } from "react";
import React, { useState, MouseEvent } from "react";
import { PostType } from "./typesrc";
type Props = {
......@@ -8,6 +8,10 @@ type Props = {
export default function Post({ post }: Props) {
const [count, setCount] = useState(0);
// const titleHandleClick = (event:MouseEvent<HTMLButtonElement>) => {
// setCount(count + 1)
// }
return (
<div className="flex flex-row h-16 divide-x-2 border-2 border-solid">
<div className="basis-full">
......
......@@ -2,5 +2,4 @@ export interface PostType {
id: string;
title: string;
date: string;
click: number;
}
\ No newline at end of file
import React, { useState, MouseEvent } from "react";
import React, { useState, } from "react";
import { PostType } from "./typesrc";
import Post from "./post";
......@@ -6,7 +6,7 @@ function range(start:number, end:number) {
return (new Array(end - start + 1)).fill(undefined).map((_, i) => i + start);
}
const fakes = [{id: "a", title:'부산남자의 서울여행', date:'2022-06-30', click: 0},{id: "b", title:'바다!바다!바다!', date:'2022-08-01',click:0}, {id: "c", title:'Jeju-island', date:'2022-9-10',click:0}, {id: "d", title:'마! 부싼 가봤나!', date:'2022-9-22', click:0}, {id: "e", title:'Daegu', date:'2022-10-1', click:0}, {id: "f", title:'강원도 감자는 맛있다.', date:'2022-12-12',click:0},{id: "g", title:'여행가고싶다...',date:'2022-12-25',click:0}];
const fakes = [{id: "a", title:'부산남자의 서울여행', date:'2022-06-30',},{id: "b", title:'바다!바다!바다!', date:'2022-08-01',}, {id: "c", title:'Jeju-island', date:'2022-9-10',}, {id: "d", title:'마! 부싼 가봤나!', date:'2022-9-22', }, {id: "e", title:'Daegu', date:'2022-10-1', }, {id: "f", title:'강원도 감자는 맛있다.', date:'2022-12-12',},{id: "g", title:'여행가고싶다...',date:'2022-12-25',}];
interface Posts {
posts: PostType[];
......@@ -16,10 +16,6 @@ export default function BoardPage() {
const [posts, setPosts] = useState<PostType[]>(fakes);
// const titleHandleClick = (event:MouseEvent<HTMLButtonElement>) => {
// setPosts( posts)
// }
return (
<div className="flex flex-col items-center">
<div className="flex flex-col items-center mt-6">
......
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