Commit af606e31 authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

링크 주소 변경

parent 528f2f5e
...@@ -50,7 +50,8 @@ export const ModifySurvey = ({ surveyData, callApi }: Props) => { ...@@ -50,7 +50,8 @@ export const ModifySurvey = ({ surveyData, callApi }: Props) => {
setLoading(true); setLoading(true);
const result = await callApi(survey); const result = await callApi(survey);
console.log("result:", result); console.log("result:", result);
navigate("/surveys/profile", { replace: true }); // navigate("/surveys/profile", { replace: true });
navigate(-1);
} catch (error) { } catch (error) {
setLoading(false); setLoading(false);
catchErrors(error, setError); catchErrors(error, setError);
......
...@@ -22,11 +22,7 @@ export const SurveyCard = ({ survey, handleDelete }: Props) => { ...@@ -22,11 +22,7 @@ export const SurveyCard = ({ survey, handleDelete }: Props) => {
return ( return (
<div className="w-40 h-48 md:w-52 md:h-60 rounded border-2 hover:border-2 hover:border-themeColor"> <div className="w-40 h-48 md:w-52 md:h-60 rounded border-2 hover:border-2 hover:border-themeColor">
<Link <Link to={`${survey._id}`} state={survey} className="w-full pt-1">
to={`/surveys/${survey._id}/edit`}
state={survey}
className="w-full pt-1"
>
<p className="font-bold"> <p className="font-bold">
{survey.title ? survey.title : "제목없는 설문조사"} {survey.title ? survey.title : "제목없는 설문조사"}
</p> </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