refactor: added support for base url using a shared function
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
import { Link } from 'preact-router/match'
|
||||
import { isAdministrator } from '../../shared/model'
|
||||
import { prependBaseUrl } from '../api'
|
||||
import { useCurrentUser } from '../hooks/useCurrentUser'
|
||||
|
||||
// const ROLE_LABEL: Record<UserRole, string> = {
|
||||
// ['admin']: 'Admin',
|
||||
// ['moderator']: 'Moderatore',
|
||||
// ['student']: 'Studente',
|
||||
// }
|
||||
import { isAdministrator } from '../../shared/model'
|
||||
import { prependBaseUrl } from '../../shared/utils'
|
||||
|
||||
import { useCurrentUser } from '../hooks/useCurrentUser'
|
||||
|
||||
export const Header = ({}) => {
|
||||
const [user] = useCurrentUser()
|
||||
|
||||
Reference in New Issue
Block a user