Commit eeb9a28a authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

survey보는 페이지 이동버튼

parent a47b2cf2
......@@ -17,7 +17,7 @@ export const SurveyRouter = () => {
<Route path="login" element={<Login />} />
<Route path="signup" element={<SignUp />} />
<Route path="surveys/edit/:surveyId" element={<EditSurvey />} />
<Route path="survey" element={<SurveyForm />} />
<Route path="surveys/:surveyId" element={<SurveyForm />} />
<Route
path="profile"
element={
......
......@@ -20,6 +20,12 @@ export const MySurveyCard = ({ data }: Props) => {
});
};
const goSurvey = () => {
navigate(`/surveys/${data._id}`, {
replace: true,
});
};
async function deleteSurvey() {
try {
if (data._id) {
......@@ -47,9 +53,11 @@ export const MySurveyCard = ({ data }: Props) => {
</div>
<div className="flex flex-col px-5 py-3">
<div className="h-12">
<button type="button" onClick={goSurvey}>
<p className="font-bold">
{data.title ? data.title : "제목없는 설문조사"}
</p>
</button>
<p className="text-gray-500 text-sm">
{data.updatedAt?.substring(0, 10)}
</p>
......
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