Profile.tsx 3.89 KB
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
import React from "react";
2
import { useNavigate } from "react-router-dom";
Yoon, Daeki's avatar
Yoon, Daeki committed
3
4

export const Profile = () => {
5
6
7
8
9
10
11
  const navigate = useNavigate();

  const createSurvey = () => {
    // 먼저 서버에 survey 테이블에 새로운 survey 항목 추가 로직 필요
    navigate("/surveys/create", { replace: true });
  };

Lee SeoYeon's avatar
Lee SeoYeon committed
12
  return (
Lee SeoYeon's avatar
0708    
Lee SeoYeon committed
13
14
    <div className="flex flex-col items-center">
      <div className="m-5">나의 설문조사</div>
Lee SeoYeon's avatar
Lee SeoYeon committed
15
      <div className="flex flex-row space-x-4 mt-5">
16
17
        <button
          onClick={createSurvey}
Lee SeoYeon's avatar
Lee SeoYeon committed
18
19
20
21
22
          className="flex h-60 w-48 items-center border-2 border-themeColor font-bold bg-gray-200 hover:bg-themeColor rounded-lg "
        >
          <div className="text-center px-6 py-6 font-bold text-gray-500 place-items-center hover:text-white">
            CREATE NEW SURVEY!
          </div>
23
        </button>
Lee SeoYeon's avatar
Lee SeoYeon committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
        <div className="w-48 h-60 rounded overflow-hidden border-2">
          <div className="px-6 py-4">
            <p className="text-gray-700 text-base">
              Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            </p>
          </div>
          <div className="flex flex-col py-6">
            <div className="px-2 py-2">
              <label>설문조사 이름</label>
            </div>
            <div className="flex justify-end dropdown-toggle">
              <select className="py-2 w-14 bg-themeColor rounded text-white">
                <option selected>옵션</option>
                <option>삭제</option>
                <option>이름 바꾸기</option>
              </select>
            </div>
          </div>
        </div>
        <div className="w-48 h-60 rounded overflow-hidden border-2">
          <div className="px-6 py-4">
            <p className="text-gray-700 text-base">
              Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            </p>
          </div>
          <div className="flex flex-col py-6">
            <div className="px-2 py-2">
              <label>설문조사이름</label>
            </div>
            <div className="flex justify-end dropdown-toggle">
              <select className="py-2 w-14 bg-themeColor rounded text-white">
                <option selected>옵션</option>
                <option>삭제</option>
                <option>이름 바꾸기</option>
              </select>
            </div>
          </div>
        </div>
        <div className="w-48 h-60 rounded overflow-hidden border-2">
          <div className="px-6 py-4">
            <p className="text-gray-700 text-base">
              Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            </p>
          </div>
          <div className="flex flex-col py-6">
            <div className="px-2 py-2">
              <label>설문조사 이름</label>
            </div>
            <div className="flex justify-end dropdown-toggle">
              <select className="py-2 w-14 bg-themeColor rounded text-white">
                <option selected>옵션</option>
                <option>삭제</option>
                <option>이름 바꾸기</option>
              </select>
            </div>
          </div>
        </div>
        <div className="w-48 h-60 rounded overflow-hidden border-2">
          <div className="px-6 py-4">
            <p className="text-gray-700 text-base">
              Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            </p>
          </div>
          <div className="flex flex-col py-6">
            <div className="px-2 py-2">
              <label>설문조사 이름</label>
            </div>
            <div className="flex justify-end dropdown-toggle">
              <select className="py-2 w-14 bg-themeColor rounded text-white">
                <option selected>옵션</option>
                <option>삭제</option>
                <option>이름 바꾸기</option>
              </select>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
Yoon, Daeki's avatar
Yoon, Daeki committed
103
};