Updated cities table.

This commit is contained in:
Mike Cao 2023-08-26 12:46:27 -07:00
parent c22fefaa2d
commit bb77c2ead6
8 changed files with 52 additions and 23 deletions

View file

@ -4,7 +4,13 @@ import { useRouter } from 'next/router';
import Link from 'next/link';
import styles from './SideNav.module.css';
export function SideNav({ selectedKey, items, shallow, onSelect = () => {} }) {
export function SideNav({
selectedKey,
items,
shallow = true,
scroll = false,
onSelect = () => {},
}) {
const { asPath } = useRouter();
return (
<Menu items={items} selectedKey={selectedKey} className={styles.menu} onSelect={onSelect}>
@ -13,7 +19,7 @@ export function SideNav({ selectedKey, items, shallow, onSelect = () => {} }) {
key={key}
className={classNames(styles.item, { [styles.selected]: asPath.startsWith(url) })}
>
<Link href={url} shallow={shallow}>
<Link href={url} shallow={shallow} scroll={scroll}>
{label}
</Link>
</Item>