diff --git a/src/apis/curation.ts b/src/apis/curation.ts new file mode 100644 index 0000000..d005ba9 --- /dev/null +++ b/src/apis/curation.ts @@ -0,0 +1,21 @@ +// import { BarType } from '@lib/types'; +import RestAPI from './restapi'; + +class CurationAPI { + /** + * 술집 목록 조회 + * @param latitude + * @param longitude + */ + public async getCurationList(data) { + try { + const { latitude, longitude } = data; + const result = await RestAPI.get(`/api/curation?regionId={regionId}&offset={offset}&limit={limit}`); + return result.data; + } catch (error) { + console.log(error); + } + } +} + +export default new CurationAPI(); diff --git a/src/apis/index.ts b/src/apis/index.ts index f9d4d93..e068485 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -1,9 +1,11 @@ import { default as user } from './users'; import { default as bar } from './bar'; +import { default as curation } from './curation'; const apis = { user, bar, + curation, }; export default apis; diff --git a/src/pages/curation/index.tsx b/src/pages/curation/index.tsx index fbcb82b..4ae0a58 100644 --- a/src/pages/curation/index.tsx +++ b/src/pages/curation/index.tsx @@ -4,9 +4,11 @@ import styled from 'styled-components'; import { BottomMenu, Box, CommonWrapper } from '@components/common'; import { CurationItem } from '@components/pages/curation'; import { useRouter } from 'next/router'; +import useGeoloaction from '@hooks/common/useGetCurrentLocation'; function Curation() { const router = useRouter(); + const { location } = useGeoloaction(); const handleClick = () => { router.push('/curation/detail/info'); @@ -31,6 +33,7 @@ export default Curation; const Wrapper = styled(CommonWrapper)` padding: 20px; + background-color: #fff; h1 { margin: 30px 0; @@ -40,6 +43,7 @@ const Wrapper = styled(CommonWrapper)` padding: 15px; height: 100%; overflow: auto; + -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ }