EditResultButton.tsx 762 Bytes
Newer Older
1
2
3
import React from "react";
import { Outlet, useNavigate, useParams } from "react-router-dom";

4
export const EditResultButton = () => {
5
6
7
8
  let { surveyId } = useParams<{ surveyId: string }>();
  const navigate = useNavigate();

  function editButtonClick(e: React.MouseEvent<HTMLButtonElement>) {
jang dong hyeok's avatar
jang dong hyeok committed
9
    navigate(`/surveys/${surveyId}/edit`);
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  }
  return (
    <div>
      <div className="flex place-content-center">
        <button
          className="text-xl m-3 underline decoration-4"
          onClick={editButtonClick}
        >
          설문지 수정
        </button>
        <button
          className="text-xl m-3 underline"
          /*onClick={}*/
        >
          응답결과
        </button>
      </div>
      <Outlet />
    </div>
  );
};