Edit.tsx 298 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
import React from "react";
Jiwon Yoon's avatar
Jiwon Yoon committed
2
import { useQuestion } from "./question.context";
Jiwon Yoon's avatar
Jiwon Yoon committed
3
4
5
6
7

type Props = {
  id: string;
};

Jiwon Yoon's avatar
Jiwon Yoon committed
8
9
10
export const Edit = ({ id }: Props) => {
  const { editClick } = useQuestion();

Jiwon Yoon's avatar
Jiwon Yoon committed
11
  return (
Jiwon Yoon's avatar
Jiwon Yoon committed
12
    <button id={id} className="w-1/12" onClick={editClick}>
Jiwon Yoon's avatar
Jiwon Yoon committed
13
14
15
16
      수정
    </button>
  );
};