Skip to content

Commit

Permalink
Merge main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
AmiyaSX committed Sep 27, 2024
1 parent 13a2735 commit df6c35e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
7 changes: 5 additions & 2 deletions src/app/student/map/_components/MapComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
Source
} from "react-map-gl/maplibre"
import { BoothMap, GeoJsonBooth } from "../lib/booths"
import { BoothMarkers } from "./BoothMarkers"
import { BoothMarker } from "./BoothMarker"

const boothLayerStyle: FillLayer = {
source: "booths",
Expand Down Expand Up @@ -136,7 +136,10 @@ export function MapComponent({

// Don't want to rerender markers on every map render
const markers = useMemo(
() => BoothMarkers({ boothMap: boothsById, scale: markerScale }),
() =>
Array.from(boothsById.values()).map(booth => (
<BoothMarker key={booth.id} booth={booth} scale={markerScale} />
)),
[boothsById, markerScale]
)

Expand Down
2 changes: 1 addition & 1 deletion src/app/student/map/_components/MapListFilteringHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MultiSelect from "@/app/student/exhibitors/_components/MultiSelect"
import MultiSelect from "@/app/student/_components/MultiSelect"
import { Booth } from "@/app/student/map/lib/booths"
import { Exhibitor } from "@/components/shared/hooks/api/useExhibitors"
import { Input } from "@/components/ui/input"
Expand Down
19 changes: 10 additions & 9 deletions src/app/student/map/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { LocationId, locations } from "@/app/student/map/lib/locations"
import { feature } from "@/components/shared/feature"
import { fetchExhibitors } from "@/components/shared/hooks/api/useExhibitors"
import { notFound } from "next/navigation"
import { Suspense } from "react"

export default async function Page() {
if (!feature("MAP_PAGE")) {
Expand Down Expand Up @@ -35,16 +36,16 @@ export default async function Page() {
boothsByLocation.get(booth.location)!.set(id, booth)
})

const editorMode = true

return (
// TODO: pt-16 is to account for the navbar, will break if navbar size changes
<div className="flex h-screen pt-16">
<MainView
exhibitorsById={exhibitorsByID}
boothsByLocation={boothsByLocation}
boothsById={boothsById}
/>
</div>
<Suspense>
<div className="flex h-screen pt-16">
<MainView
exhibitorsById={exhibitorsByID}
boothsByLocation={boothsByLocation}
boothsById={boothsById}
/>
</div>
</Suspense>
)
}
4 changes: 2 additions & 2 deletions src/feature_flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const FEATURE_FLAGS: Record<
keyof typeof FEATURE_FLAG_DEFINITIONS,
boolean
> = {
EVENT_PAGE: false,
MAP_PAGE: true
EVENT_PAGE: true,
MAP_PAGE: false
}

export default FEATURE_FLAGS

0 comments on commit df6c35e

Please sign in to comment.