Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
eeb9a28a
Commit
eeb9a28a
authored
Jul 18, 2022
by
Lee SeoYeon
Browse files
survey보는 페이지 이동버튼
parent
a47b2cf2
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/SurveyRouter.tsx
View file @
eeb9a28a
...
...
@@ -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
=
"survey
s/:surveyId
"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
path
=
"profile"
element
=
{
...
...
frontend/src/profile/MySurveyCard.tsx
View file @
eeb9a28a
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment