Skip to content

Commit

Permalink
Added top navbar with search box and centering button, imported all t…
Browse files Browse the repository at this point in the history
…he institute names to search box so that it can move to the location on the globe.
  • Loading branch information
Rhymlore committed Oct 19, 2023
1 parent aa3bc95 commit cfd4fe0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
35 changes: 16 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"devDependencies": {
"@types/bootstrap": "^5.2.7",
"@types/mapbox-gl": "^2.7.17",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
4 changes: 2 additions & 2 deletions src/components/mapbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Head from "next/head";
import { useEffect, useState, useRef } from "react";
import mapboxgl from 'mapbox-gl';
import Popover from '@mui/material/Popover';
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
Expand All @@ -11,6 +10,7 @@ import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
import '../app/globals.css';
import { ThemeProvider, createTheme} from '@mui/material/styles';
import * as mapboxgl from 'mapbox-gl';

interface Institution {
name: string;
Expand All @@ -33,7 +33,7 @@ interface Institution {
export const GlobeComponent = () => {
const [anchorEl, setAnchorEl] = useState<Element | null>(null);
const [popoverContent, setPopoverContent] = useState<string>('');
const mapRef = useRef<mapboxgl.Map | null>(null);
const mapRef = useRef<mapboxgl.Map | null>(null as any);
const [institutionData, setInstitutionData] = useState<Institution[]>([]);

const theme = createTheme({
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"types": ["mapbox-gl"],
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"typeRoots": ["./types", "node_modules/@types"],
Expand Down

0 comments on commit cfd4fe0

Please sign in to comment.