//next.js page to show all locatons in the database with a link to the location page import { Location, UserRole } from "@prisma/client"; import Layout from "../../../components/layout"; import LocationCard from "../../../components/location/LocationCard"; import axiosServer from '../../../src/axiosServer'; import ProtectedRoute from '../../../components/protectedRoute'; interface IProps { item: Location; } function LocationsPage({ items = [] }: IProps) { const renderLocations = () => { if (!Array.isArray(items) || items.length === 0) return