-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 빌드 시, document 객체에 접근하지 못하는 원인 파악 테스트 (#101)
- Loading branch information
1 parent
e0a8c72
commit 4781cdd
Showing
5 changed files
with
138 additions
and
129 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,133 @@ | ||
// 'use client' | ||
|
||
// import dynamic from 'next/dynamic' | ||
|
||
// const LocationPage = dynamic(() => import('./LocationPage'), { | ||
// ssr: false, | ||
// }) | ||
|
||
// export default LocationPage | ||
|
||
'use client' | ||
|
||
import dynamic from 'next/dynamic' | ||
// import { useState } from 'react' | ||
// import { MapMarker, MarkerClusterer } from 'react-kakao-maps-sdk' | ||
|
||
// import VehicleDetailsCard from '@/app/(main)/location/components/VehicleDetailsCard' | ||
// import VehicleMarker from '@/app/(main)/location/components/VehicleMarker' | ||
import VehicleStatus from '@/app/(main)/location/components/VehicleStatus' | ||
import SearchInput from '@/components/common/Input/SearchInput' | ||
import Modal from '@/components/common/Modal' | ||
import { ModalMessageType } from '@/components/common/Modal/types' | ||
import Map from '@/components/domain/map/Map' | ||
// import { MARKER_IMAGE } from '@/constants/map' | ||
import { useSearchSingleVehicle } from '@/hooks/useSearchSingleVehicle' | ||
// import { vehicleAPI } from '@/lib/apis' | ||
// import koreaLocation from '@/mock/metropolitan_coordinates.json' | ||
// import { vars } from '@/styles/theme.css' | ||
// import { VehicleDetailsModel } from '@/types/vehicle' | ||
|
||
import * as styles from './styles.css' | ||
|
||
const LocationPage = () => { | ||
// const [isDetailsCardVisible, setIsDetailsCardVisible] = useState(false) | ||
// const [vehicleDetails, setVehicleDetails] = useState<VehicleDetailsModel>() | ||
|
||
const { | ||
// vehicleInfo, | ||
mapState, | ||
// isVehicleVisible, | ||
searchTerm, | ||
modalMessage, | ||
isOpen, | ||
handleVehicleSearch, | ||
handleSearchChange, | ||
closeModal, | ||
} = useSearchSingleVehicle() | ||
|
||
// const handleVehicleClick = async () => { | ||
// const vehicleDetailsData = await vehicleAPI.fetchVehicleDetails() | ||
|
||
// if (!vehicleDetailsData) return | ||
|
||
// setVehicleDetails(vehicleDetailsData) | ||
// setIsDetailsCardVisible(true) | ||
// } | ||
|
||
// const isVehicleMarkerVisible = isVehicleVisible && vehicleInfo | ||
// const isVehicleDetailsVisible = isDetailsCardVisible | ||
|
||
const LocationPage = dynamic(() => import('./LocationPage'), { | ||
ssr: false, | ||
}) | ||
return ( | ||
<div className={styles.container}> | ||
<Map center={mapState.center} zoom={mapState.level}> | ||
{/* {isVehicleMarkerVisible && ( | ||
<VehicleMarker vehicleInfo={vehicleInfo} onVehicleClick={handleVehicleClick} /> | ||
)} | ||
<MarkerClusterer | ||
averageCenter={true} | ||
styles={[ | ||
{ | ||
width: '40px', | ||
height: '40px', | ||
background: '#ed968490', | ||
borderRadius: '50%', | ||
color: vars.colors.black, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
fontWeight: 'bold', | ||
}, | ||
{ | ||
width: '60px', | ||
height: '60px', | ||
background: '#008a8590', | ||
borderRadius: '50%', | ||
color: vars.colors.black, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
fontWeight: 'bold', | ||
}, | ||
{ | ||
width: '80px', | ||
height: '80px', | ||
background: '#ff385c80', | ||
borderRadius: '50%', | ||
color: vars.colors.black, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
fontWeight: 'bold', | ||
}, | ||
]} | ||
calculator={[10, 30, 50]} | ||
gridSize={100} | ||
> | ||
{koreaLocation.map((marker, index) => ( | ||
<MapMarker key={index} position={marker} image={MARKER_IMAGE} /> | ||
))} | ||
</MarkerClusterer> */} | ||
</Map> | ||
<div className={styles.searchInputWrapper}> | ||
<SearchInput | ||
icon='/icons/search-icon.svg' | ||
value={searchTerm} | ||
onChange={handleSearchChange} | ||
onSubmit={handleVehicleSearch} | ||
/> | ||
</div> | ||
<VehicleStatus /> | ||
{/* {isVehicleDetailsVisible && ( | ||
<VehicleDetailsCard vehicleDetails={vehicleDetails} onCloseButtonClick={setIsDetailsCardVisible} /> | ||
)} */} | ||
<Modal | ||
isOpen={isOpen} | ||
message={modalMessage as ModalMessageType} | ||
variant={{ variant: 'alert', confirmButton: '확인' }} | ||
onClose={closeModal} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default LocationPage |
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