import React, { useContext } from 'react'
import Head from 'next/head'
import styles from 'styles/Map.module.css'
import dynamic from 'next/dynamic'
import { supabase } from 'lib/Store'
import SignIn from 'components/SignIn'
import UserContext from 'lib/UserContext'
const MapView = dynamic(
() => import('components/MapView'),
{ ssr: false }
)
export default function Page() {
const { user, signOut } = useContext(UserContext)
const center = {
lat: 1.3489728457596013,
lng: 103.77043978311998
}
const zoomLevel = 12
return (
Manager View
Manager View
As manager, you can view all drivers' locations as long as the drivers are ONLINE
{!user &&
}
{user && (
{
user.role === "MANAGER"
?
:
Sorry, you need to sign in as manager
}
Signed in as {user.username} [{user.role}]
)}
)
}