Skip to content

Commit

Permalink
solved the icon problems
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudLun committed Apr 11, 2024
1 parent 3604089 commit bf07a01
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"
import Image from 'next/image'



import { MapProvider } from '@/contexts/MapContext'
import { StreetViewProvider } from '@/contexts/StreetViewContext'
Expand All @@ -12,16 +13,17 @@ import StreetView from '@/components/streetView/StreetView'
import Narrative from '@/components/narrative/Narrative'



export default function Home() {



return (
<main className="relative w-[100vw] h-[100vh] overflow-y-hidden">
<MapProvider>
<NarrativeProvider>
<StreetViewProvider>
<MarkerProvider>
<Narrative />

<Map />
<InfoPage />
<StreetView />
Expand Down
5 changes: 3 additions & 2 deletions components/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const Map = () => {
style: "mapbox://styles/betanyc/clrrs5fv200h101o87qwn1sw1",
center: [lng, lat],
zoom: zoom,
minZoom: 6,
maxZoom: 12,
minZoom: 8,
maxZoom: 14,
interactive: true,
doubleClickZoom: false,
})
Expand Down Expand Up @@ -200,6 +200,7 @@ const Map = () => {

return (
<div className=' relative w-full h-full'>
<img src="/logos/floodgen_logo_white.png" className="absolute left-4 top-6 w-[155px] h-[38.75px] z-[999] " alt="logos_white" />
<div className={`absolute left-0 w-full z-10 transition-all duration-[1500ms] ease-in-out ${openStreetView ? "top-[65%] h-[35vh]" : "top-[0%] h-[100vh]"}`} ref={mapContainer} id='map'></div>
<MapLayer />
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/narrative/Narrative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import { XMarkIcon } from "@heroicons/react/20/solid";
const Narrative = () => {

const { openNarrative, setOpenNarrative } = useContext(NarrativeContext) as NarrativeType

const clickHandler = () => setOpenNarrative(false)

return (
<>
{
openNarrative && (
<>
<div className="absolute right-8 top-6 flex items-center justify-center w-[35px] h-[35px] bg-[#E7E7E7] bg-opacity-60 rounded-full z-[10002] cursor-pointer">
<img src="/logos/floodgen_logo_white.png" className="absolute left-4 top-6 w-[155px] h-[38.75px] z-[1003] " alt="logos_white" />
<div className="absolute right-8 top-6 flex items-center justify-center w-[35px] h-[35px] bg-[#E7E7E7] bg-opacity-60 rounded-full z-[1003] cursor-pointer">
<XMarkIcon width={24} height={24} className=" text-black font-thin " onClick={clickHandler} />
</div>
<div className="absolute top-0 left-0 z-[1002] w-full h-full overflow-y-auto ">
Expand Down
2 changes: 1 addition & 1 deletion hooks/useTooltips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const useTooltips = () => {
const content = `<div class="content">
${e.features[0].properties.FLD_ZONE === "VE" ? "<div class='zone' style='background:#3B9CD9'>1% annual chance flood event (coastal)</div>" :
e.features[0].properties.FLD_ZONE === "AE" ? "<div class='zone' style='background:#7FBEE6'>1% annual chance flood event</div>" :
"<div class='zone' style='background:#C1DFF3'>0.2% annual chance of flood hazard</div>"
"<div class='zone' style='background:#C1DFF3'>0.2% annual chance flood event</div>"
}
${e.features[0].properties.FLD_ZONE === "VE" ? "<div class='description'>Areas along coasts that are subject to inundation by a 100-year flood event (1% annual chance)</div>" :
e.features[0].properties.FLD_ZONE === "AE" ? "<div class='description'>Areas that are subject to inundation by a 100-year flood event (1% annual chance)</div>" :
Expand Down

0 comments on commit bf07a01

Please sign in to comment.