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
3052a1ed
Commit
3052a1ed
authored
Jul 18, 2022
by
Jiwon Yoon
Browse files
Merge branch 'DH6' into develop0718
parents
de41c36d
dfd1731e
Changes
4
Hide whitespace changes
Inline
Side-by-side
frontend/src/SurveyRouter.tsx
View file @
3052a1ed
...
@@ -6,7 +6,8 @@ import { RequireAuth } from "./auth/RequireAuth";
...
@@ -6,7 +6,8 @@ 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
{
EditSurvey
}
from
"
./survey
"
;
import
{
EditResponseButton
}
from
"
./survey
"
;
import
{
EditSurvey
}
from
"
./survey/EditSurvey
"
;
export
const
SurveyRouter
=
()
=>
{
export
const
SurveyRouter
=
()
=>
{
return
(
return
(
...
@@ -16,8 +17,11 @@ export const SurveyRouter = () => {
...
@@ -16,8 +17,11 @@ 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/:surveyId"
element
=
{
<
EditSurvey
/>
}
/>
<
Route
path
=
"surveys/edit/"
element
=
{
<
EditResponseButton
/>
}
>
<
Route
path
=
"surveys/:surveyId"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
path
=
":surveyId"
element
=
{
<
EditSurvey
/>
}
/>
<
Route
path
=
":surveyId/response"
element
/>
</
Route
>
<
Route
path
=
"survey"
element
=
{
<
SurveyForm
/>
}
/>
<
Route
<
Route
path
=
"profile"
path
=
"profile"
element
=
{
element
=
{
...
...
frontend/src/apis/baseUrl.ts
View file @
3052a1ed
export
default
"
/api
"
;
export
default
"
/api
"
;
export
const
baseImageUrl
=
"
http://localhost:3000/images
"
;
export
const
baseImageUrl
=
"
http://localhost:3000/images
"
;
\ No newline at end of file
frontend/src/survey/EditResponseButton.tsx
0 → 100644
View file @
3052a1ed
import
React
from
"
react
"
;
import
{
Outlet
,
useNavigate
,
useParams
}
from
"
react-router-dom
"
;
export
const
EditResponseButton
=
()
=>
{
let
{
surveyId
}
=
useParams
<
{
surveyId
:
string
}
>
();
const
navigate
=
useNavigate
();
function
editButtonClick
(
e
:
React
.
MouseEvent
<
HTMLButtonElement
>
)
{
navigate
(
`/surveys/edit/
${
surveyId
}
`
);
}
return
(
<
div
>
<
div
className
=
"flex place-content-center"
>
<
button
className
=
"text-xl m-3 underline decoration-4"
onClick
=
{
editButtonClick
}
>
설문지 수정
</
button
>
<
button
className
=
"text-xl m-3 underline"
/*onClick={}*/
>
응답결과
</
button
>
</
div
>
<
Outlet
/>
</
div
>
);
};
frontend/src/survey/index.tsx
View file @
3052a1ed
export
{
Edit
Survey
}
from
"
./Edit
Survey
"
;
export
{
Edit
ResponseButton
}
from
"
./Edit
ResponseButton
"
;
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