-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9be3d12
commit fec670f
Showing
18 changed files
with
9,361 additions
and
81 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,8 +164,6 @@ function Header() { | |
'http://localhost:3000' | ||
}) | ||
}} | ||
width="4.5rem" | ||
height="2.4rem" | ||
/> | ||
</Menu> | ||
) : ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { ReactComponent as Good } from '../assets/good.svg' | ||
import { ReactComponent as Bad } from '../assets/bad.svg' | ||
import { ReactComponent as Favorite } from '../assets/favorite.svg' | ||
import Map from './Map' | ||
import Button from './commons/Button' | ||
import IconButton from './commons/IconButton' | ||
|
||
declare global { | ||
interface Window { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
kakao: any | ||
} | ||
} | ||
|
||
const MapSection = styled.div` | ||
width: 100%; | ||
flex: 1; | ||
.overlaybox { | ||
background-color: black; | ||
} | ||
` | ||
|
||
const IconButtonSection = styled.div` | ||
display: flex; | ||
gap: 1rem; | ||
` | ||
|
||
const ButtonSection = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
margin: 1rem 0; | ||
` | ||
|
||
function StatModal1({ | ||
mapPosition, | ||
handlePage, | ||
}: { | ||
mapPosition: number[] | ||
handlePage: () => void | ||
}) { | ||
return ( | ||
<> | ||
<ButtonSection> | ||
<IconButtonSection> | ||
<IconButton onClick={() => {}}> | ||
<Good fill="#019e74" /> | ||
</IconButton> | ||
<IconButton onClick={() => {}}> | ||
<Bad fill="rgb(229, 9, 20)" /> | ||
</IconButton> | ||
<IconButton onClick={() => {}}> | ||
<Favorite fill="#FFD700" /> | ||
</IconButton> | ||
</IconButtonSection> | ||
<Button name="필터로 검색하기" onClick={handlePage} /> | ||
</ButtonSection> | ||
<MapSection> | ||
<Map mapPosition={mapPosition} /> | ||
</MapSection> | ||
</> | ||
) | ||
} | ||
export default StatModal1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import React, { useEffect, useState } from 'react' | ||
import styled from 'styled-components' | ||
import axios from 'axios' | ||
import Button from './commons/Button' | ||
import DropDown from './commons/DropDown' | ||
|
||
const TopSection = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
margin: 1rem 0; | ||
` | ||
|
||
const FilterSection = styled.div` | ||
select { | ||
margin-right: 1rem; | ||
} | ||
` | ||
|
||
function StatModal2({ handlePage }: { handlePage: () => void }) { | ||
const [region1, setRegion1] = useState<string>('서울특별시') | ||
const [region2, setRegion2] = useState<string>('강남구') | ||
const [gender, setGender] = useState<string>('male') | ||
const [ageGroup, setAgeGroup] = useState<string>('20') | ||
|
||
useEffect(() => {}, []) | ||
|
||
return ( | ||
<TopSection> | ||
<FilterSection> | ||
<DropDown | ||
selectId="region1" | ||
onChange={(e) => { | ||
setRegion1(e.target.value) | ||
}} | ||
options={[ | ||
{ value: '서울특별시', name: '서울특별시' }, | ||
{ value: '경기도', name: '경기도' }, | ||
]} | ||
/> | ||
<DropDown | ||
selectId="region2" | ||
onChange={(e) => { | ||
setRegion2(e.target.value) | ||
}} | ||
options={[ | ||
{ value: '강남구', name: '강남구' }, | ||
{ value: '화성시', name: '화성시' }, | ||
]} | ||
/> | ||
<DropDown | ||
selectId="gender" | ||
onChange={(e) => { | ||
setGender(e.target.value) | ||
}} | ||
options={[ | ||
{ value: 'male', name: '남성' }, | ||
{ value: 'female', name: '여성' }, | ||
]} | ||
/> | ||
<DropDown | ||
selectId="ageGroup" | ||
onChange={(e) => { | ||
setAgeGroup(e.target.value) | ||
// eslint-disable-next-line no-console | ||
console.log(e.target.value) | ||
}} | ||
options={[ | ||
{ value: '10', name: '10대' }, | ||
{ value: '20', name: '20대' }, | ||
{ value: '30', name: '30대' }, | ||
{ value: '40', name: '40대' }, | ||
{ value: '50', name: '50대' }, | ||
{ value: '60', name: '60대' }, | ||
{ value: '70', name: '70대' }, | ||
{ value: '80', name: '80대' }, | ||
]} | ||
/> | ||
<Button | ||
name="검색" | ||
onClick={() => { | ||
axios | ||
.get( | ||
'http://localhost/statistics/by-region-gender-ageGroup', | ||
{ | ||
params: { | ||
region: `${region1} ${region2}`, | ||
gender, | ||
ageGroup: Number(ageGroup), | ||
}, | ||
withCredentials: true, | ||
} | ||
) | ||
.then((response) => { | ||
// eslint-disable-next-line no-console | ||
console.log(response) | ||
}) | ||
}} | ||
/> | ||
</FilterSection> | ||
<Button name="지도로 보기" onClick={handlePage} /> | ||
</TopSection> | ||
) | ||
} | ||
export default StatModal2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.