import React from 'react' import { useRouter } from 'next/router' import Link from 'next/link' import styles from './adminNav.module.css' export default function AdminNav({}){ const {asPath: fullpath} = useRouter() const withoutQuery = fullpath.split('?')[0] const adminRoutes = new RegExp('^/admin(/.*|$)') if(!withoutQuery.match(adminRoutes)) return null return (
Items Categories Users Shipping
) }