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
travel
Commits
a2b972b2
Commit
a2b972b2
authored
Jun 29, 2022
by
백승민
Browse files
theme name
parent
99795566
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/pages/body.tsx
View file @
a2b972b2
import
React
,
{
MouseEventHandler
,
useEffect
,
MouseEvent
}
from
"
react
"
;
import
React
,
{
useEffect
,
MouseEvent
}
from
"
react
"
;
import
{
BrowserRouter
,
Route
,
Routes
,
Link
,
Outlet
,
useSearchParams
}
from
"
react-router-dom
"
;
import
Theme
from
"
./theme
"
;
import
getUrl
from
"
../url
"
// const initSearchParams = ["theme", "city"]
const
initSearchParams
=
{
"
theme
"
:
"
1
"
,
"
city
"
:
"
1
"
}
export
default
function
Body
()
{
const
[
searchParams
,
setSearchParams
]
=
useSearchParams
(
initSearchParams
)
...
...
@@ -17,24 +16,23 @@ export default function Body() {
console
.
log
(
`theme id=
${
event
.
currentTarget
.
id
}
`
)
}
// const imgs = [1, 2, 3, 4, 5]
let
url
=
getUrl
();
let
url
=
getUrl
();
return
(
<
div
>
<
div
className
=
"flex flex-col px-5 py-5"
>
<
Theme
handleClick
=
{
handleClick
}
/>
<
div
className
=
"flex flex-col md:flex-row px-5 py-40 "
>
<
div
className
=
"flex flex-row md:flex-col md:basis-1/5 bg-gray-400 rounded "
>
<
div
>
01
</
div
>
<
div
>
02
</
div
>
<
div
>
03
</
div
>
<
div
>
04
</
div
>
<
div
>
0
5
</
div
>
<
div
>
0
6
</
div
>
<
div
>
0
7
</
div
>
<
div
>
08
</
div
>
<
div
>
09
</
div
>
<
div
>
10
</
div
>
<
div
className
=
"flex flex-row
justify-evenly
md:flex-col md:basis-1/5 bg-gray-400 rounded "
>
<
button
>
01
</
button
>
<
button
>
02
</
button
>
<
button
>
03
</
button
>
<
button
>
04
</
button
>
<
button
>
0
6
</
button
>
<
button
>
0
7
</
button
>
<
button
>
0
5
</
button
>
<
button
>
08
</
button
>
<
button
>
09
</
button
>
<
button
>
10
</
button
>
{
/* citylist */
}
</
div
>
<
div
className
=
"flex md:basis-4/5 grid grid-rows-3 grid-cols-5 outline"
>
...
...
@@ -44,10 +42,8 @@ export default function Body() {
{
/* pic */
}
</
div
>
</
div
>
<
Outlet
/>
</
div
>
</
div
>
// Body Page
// Body Page
);
};
frontend/src/pages/theme.tsx
View file @
a2b972b2
...
...
@@ -4,22 +4,18 @@ type ThemeProps = {
handleClick
:
MouseEventHandler
;
}
export
default
function
Theme
({
handleClick
}:
ThemeProps
)
{
// const handleClick = (event: MouseEvent<HTMLElement>) => {
// console.log(event.currentTarget.id)
// }
return
(
<
div
className
=
"flex flex-cols-10 justify-evenly w-full bg-emerald-400 rounded "
>
<
button
id
=
{
"
01
"
}
onClick
=
{
handleClick
}
>
01
</
button
>
<
button
>
02
</
button
>
<
button
>
03
</
button
>
<
button
>
04
</
button
>
<
button
>
05
</
button
>
<
button
>
06
</
button
>
<
button
>
07
</
button
>
<
button
>
08
</
button
>
<
button
>
09
</
button
>
<
button
>
10
</
button
>
<
button
id
=
{
"
01
"
}
onClick
=
{
handleClick
}
>
서핑
</
button
>
<
button
>
액티비티
</
button
>
<
button
>
캠핑
</
button
>
<
button
>
스키
</
button
>
<
button
>
보트
</
button
>
<
button
>
사막
</
button
>
<
button
>
골프
</
button
>
<
button
>
동굴
</
button
>
<
button
>
문화재
</
button
>
<
button
>
동물원
</
button
>
</
div
>
);
};
\ No newline at end of file
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