Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
survey
Commits
f3c4f117
Commit
f3c4f117
authored
Jul 20, 2022
by
jang dong hyeok
Browse files
profile의 card 클릭했을 때 수정,결과창으로 넘어가기
parent
3052a1ed
Changes
5
Hide whitespace changes
Inline
Side-by-side
frontend/src/SurveyRouter.tsx
View file @
f3c4f117
...
@@ -6,7 +6,7 @@ import { RequireAuth } from "./auth/RequireAuth";
...
@@ -6,7 +6,7 @@ import { RequireAuth } from "./auth/RequireAuth";
import
{
SurveyForm
}
from
"
./commons
"
;
import
{
SurveyForm
}
from
"
./commons
"
;
import
{
Home
}
from
"
./home
"
;
import
{
Home
}
from
"
./home
"
;
import
{
Profile
}
from
"
./profile
"
;
import
{
Profile
}
from
"
./profile
"
;
import
{
EditRes
ponse
Button
}
from
"
./survey
"
;
import
{
EditRes
ult
Button
}
from
"
./survey
"
;
import
{
EditSurvey
}
from
"
./survey/EditSurvey
"
;
import
{
EditSurvey
}
from
"
./survey/EditSurvey
"
;
export
const
SurveyRouter
=
()
=>
{
export
const
SurveyRouter
=
()
=>
{
...
@@ -17,9 +17,9 @@ export const SurveyRouter = () => {
...
@@ -17,9 +17,9 @@ export const SurveyRouter = () => {
<
Route
index
element
=
{
<
Home
/>
}
/>
<
Route
index
element
=
{
<
Home
/>
}
/>
<
Route
path
=
"login"
element
=
{
<
Login
/>
}
/>
<
Route
path
=
"login"
element
=
{
<
Login
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
SignUp
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
SignUp
/>
}
/>
<
Route
path
=
"surveys/edit/"
element
=
{
<
EditRes
ponse
Button
/>
}
>
<
Route
path
=
"surveys/edit/"
element
=
{
<
EditRes
ult
Button
/>
}
>
<
Route
path
=
":surveyId"
element
=
{
<
EditSurvey
/>
}
/>
<
Route
path
=
":surveyId"
element
=
{
<
EditSurvey
/>
}
/>
<
Route
path
=
":surveyId/res
ponse
"
element
/>
<
Route
path
=
":surveyId/res
ult
"
element
/>
</
Route
>
</
Route
>
<
Route
path
=
"survey"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
path
=
"survey"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
<
Route
...
...
frontend/src/profile/MySurveyCard.tsx
View file @
f3c4f117
...
@@ -45,39 +45,39 @@ export const MySurveyCard = ({ data }: Props) => {
...
@@ -45,39 +45,39 @@ export const MySurveyCard = ({ data }: Props) => {
}
}
return
(
return
(
<
div
className
=
"w-52 h-60 rounded border-2"
>
<
div
className
=
"w-52 h-60 rounded border-2
hover:border-2 hover:border-themeColor
"
>
<
div
className
=
"
h-32 p-5"
>
<
button
className
=
"
w-full"
onClick
=
{
editSurvey
}
>
<
p
className
=
"
text-gray-700
"
>
<
div
className
=
"
h-36 p-5
"
>
{
data
.
comment
?
data
.
comment
:
"
설명없는 설문조사
"
}
<
p
className
=
"text-gray-700"
>
</
p
>
{
data
.
comment
?
data
.
comment
:
"
설명없는 설문조사
"
}
</
div
>
</
p
>
<
div
className
=
"flex flex-col px-5 py-3"
>
</
div
>
<
div
className
=
"h-12"
>
<
button
type
=
"button"
onClick
=
{
goSurvey
}
>
<
div
className
=
"flex flex-col h-12 place-items-center"
>
<
p
className
=
"font-bold"
>
<
p
className
=
"font-bold"
>
{
data
.
title
?
data
.
title
:
"
제목없는 설문조사
"
}
{
data
.
title
?
data
.
title
:
"
제목없는 설문조사
"
}
</
p
>
</
p
>
</
button
>
<
p
className
=
"text-gray-500 text-sm"
>
<
p
className
=
"text-gray-500 text-sm"
>
{
data
.
updatedAt
?.
substring
(
0
,
10
)
}
{
data
.
updatedAt
?.
substring
(
0
,
10
)
}
</
p
>
</
p
>
</
div
>
</
div
>
<
div
className
=
"flex justify-end pt-1"
>
</
button
>
<
button
<
div
className
=
"flex justify-end pt-1"
>
{
/*<button
type="button"
type="button"
className="bg-themeColor rounded text-white py-1 px-1.5 mr-1"
className="bg-themeColor rounded text-white py-1 px-1.5 mr-1"
onClick={editSurvey}
onClick={editSurvey}
>
>
수정
수정
</
button
>
</button>*/
}
<
button
<
button
type
=
"button"
type
=
"button"
className
=
"bg-themeColor rounded text-white py-1 px-1.5 ml-1"
className
=
"bg-themeColor rounded text-white py-1 px-1.5 ml-1"
onClick
=
{
deleteSurvey
}
onClick
=
{
deleteSurvey
}
>
>
삭제
삭제
</
button
>
</
button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
frontend/src/survey/EditRes
ponse
Button.tsx
→
frontend/src/survey/EditRes
ult
Button.tsx
View file @
f3c4f117
import
React
from
"
react
"
;
import
React
from
"
react
"
;
import
{
Outlet
,
useNavigate
,
useParams
}
from
"
react-router-dom
"
;
import
{
Outlet
,
useNavigate
,
useParams
}
from
"
react-router-dom
"
;
export
const
EditRes
ponse
Button
=
()
=>
{
export
const
EditRes
ult
Button
=
()
=>
{
let
{
surveyId
}
=
useParams
<
{
surveyId
:
string
}
>
();
let
{
surveyId
}
=
useParams
<
{
surveyId
:
string
}
>
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
...
...
frontend/src/survey/Result.tsx
0 → 100644
View file @
f3c4f117
import
React
from
"
react
"
;
frontend/src/survey/index.tsx
View file @
f3c4f117
export
{
EditRes
ponse
Button
}
from
"
./EditRes
ponse
Button
"
;
export
{
EditRes
ult
Button
}
from
"
./EditRes
ult
Button
"
;
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