import { clsx } from 'clsx' import { ROUTES } from '../../../config/routes' import { ConditionalWrapper } from '../../_shared/ConditionalWrapper' import { A, useMatch } from '@solidjs/router' import { createMemo } from 'solid-js' import styles from './Header.module.scss' type Props = { onMouseOver: (event?: MouseEvent, time?: number) => void onMouseOut: (event?: MouseEvent, time?: number) => void routeName?: keyof typeof ROUTES body: string active?: boolean onClick?: (event: MouseEvent) => void } export const Link = (props: Props) => { const matchRoute = useMatch(() => props.routeName || '') const isSelected = createMemo(() => Boolean(matchRoute())) return (
  • {children}} > {props.body}
  • ) }