webapp/src/components/Nav/ProfileSettingsNavigation/ProfileSettingsNavigation.tsx

28 lines
949 B
TypeScript
Raw Normal View History

import { clsx } from 'clsx'
import { useLocalize } from '../../../context/localize'
2024-06-24 17:50:27 +00:00
import { useLocation } from '@solidjs/router'
import styles from './ProfileSettingsNavigation.module.scss'
export const ProfileSettingsNavigation = () => {
2023-02-17 09:21:02 +00:00
const { t } = useLocalize()
2024-06-24 17:50:27 +00:00
const loc = useLocation()
return (
<>
2023-02-17 09:21:02 +00:00
<h4 class={styles.navigationHeader}>{t('Settings')}</h4>
<ul class={clsx(styles.navigation, 'nodash')}>
2024-06-24 17:50:27 +00:00
<li class={clsx({ [styles.active]: loc?.pathname === '/profile/settings' })}>
2023-02-17 09:21:02 +00:00
<a href="/profile/settings">{t('Profile')}</a>
</li>
2024-06-24 17:50:27 +00:00
<li class={clsx({ [styles.active]: loc?.pathname === '/profile/subscriptions' })}>
2023-02-17 09:21:02 +00:00
<a href="/profile/subscriptions">{t('Subscriptions')}</a>
</li>
2024-06-24 17:50:27 +00:00
<li class={clsx({ [styles.active]: loc?.pathname === '/profile/security' })}>
2023-02-17 09:21:02 +00:00
<a href="/profile/security">{t('Security')}</a>
</li>
</ul>
</>
)
}