-
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.
Merge pull request #444 from boostcampwm-2024/feature/fe/QA
[FE][Feat] ํ์ฌ ์์น๋ก ์ด๋ ๋ฒํผ ๊ตฌํ ๋ฐ add-channel footer ์ฌ๋ผ์ง์ง ์๋๋ก ๊ตฌํ
- Loading branch information
Showing
10 changed files
with
130 additions
and
47 deletions.
There are no files selected for viewing
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
31 changes: 31 additions & 0 deletions
31
frontend/src/component/setCurrentLocationButton/SetCurrentLocationButton.tsx
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,31 @@ | ||
import classNames from 'classnames'; | ||
import { MdMyLocation } from 'react-icons/md'; | ||
|
||
interface ISetCurruntLocationButton { | ||
map: naver.maps.Map | null; | ||
lat: number | null; | ||
lng: number | null; | ||
isMain?: boolean; | ||
} | ||
|
||
export const SetCurrentLocationButton = (props: ISetCurruntLocationButton) => { | ||
const handleCurrentLocationButton = () => { | ||
if (props.lat && props.lng) { | ||
props.map?.setCenter(new window.naver.maps.LatLng(props.lat, props.lng)); | ||
props.map?.setZoom(14); | ||
} | ||
}; | ||
|
||
return ( | ||
<button | ||
type="button" | ||
onClick={() => handleCurrentLocationButton()} | ||
className={classNames( | ||
'bg-blueGray-800 shadow-floatButton z-[5000] flex h-12 w-12 items-center justify-center rounded-full text-white', | ||
props.isMain ? 'relative bottom-0 left-2' : 'absolute bottom-5 left-5', | ||
)} | ||
> | ||
<MdMyLocation className="h-6 w-6" /> | ||
</button> | ||
); | ||
}; |
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
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