Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endret fra start til hjem, og lagt til lenke i menyen #621

Merged
merged 4 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SKIP_PREFLIGHT_CHECK=true
HTTPS=true
BROWSER=none
CI=false
CI=false
6 changes: 3 additions & 3 deletions apps/web/src/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
DebugPage,
EmployeePage,
EmployeeProfilePage,
HomePage,
NotFoundPage,
OrganizationStructurePage,
StartPage,
UnderConstructionPage,
} from '../pages'
import { useUserInfo } from '../hooks/useUserInfo'
Expand All @@ -20,8 +20,8 @@ export default function Content() {
<>
{isAuthenticated && (
<Routes>
<Route path="/" element={<Navigate replace to="/start" />} />
<Route path="/start" element={<StartPage />} />
<Route path="/" element={<Navigate replace to="/hjem" />} />
<Route path="/hjem" element={<HomePage />} />
<Route path="/ansatte" element={<EmployeePage />} />
<Route path="/ansatt/:id" element={<EmployeeProfilePage />} />
<Route path="/kunder" element={<CustomerPage />} />
Expand Down
11 changes: 9 additions & 2 deletions apps/web/src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ interface HeaderProps {
}

export default function Header({ darkMode, onChangeMode }: HeaderProps) {
const availablePages = ['/ansatte', '/kunder', '/kompetanse', '/organisasjon']
const availablePages = [
'/ansatte',
'/hjem',
'/kunder',
'/kompetanse',
'/organisasjon',
]
const activePage = useLocation().pathname
const { isAuthenticated, userEmployeeProfile } = useUserInfo()

Expand All @@ -56,6 +62,7 @@ export default function Header({ darkMode, onChangeMode }: HeaderProps) {
function HeaderTabs() {
return (
<Tabs value={tabsVisiblePage} textColor="secondary">
<Tab label={'Hjem'} value={'/hjem'} to={'/hjem'} component={NavLink} />
<Tab
label={'Ansatte'}
value={'/ansatte'}
Expand All @@ -75,7 +82,7 @@ export default function Header({ darkMode, onChangeMode }: HeaderProps) {
component={NavLink}
/>
<Tab
label={'Organisasjonsstruktur'}
label={'Organisasjon'}
value={'/organisasjon'}
to={'/organisasjon'}
component={NavLink}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { communicationLinks } from './cards/Communication'
import { administrationLinks } from './cards/Administration'
import { otherLinks } from './cards/Other'

export default function StartPage() {
export default function HomePage() {
const { trackPageView } = useMatomo()

useEffect(() => {
trackPageView({
documentTitle: 'Start',
documentTitle: 'Hjem',
})
pageTitle('Start')
pageTitle('Hjem')
}, [trackPageView])

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export { default as EmployeePage } from './employee/EmployeePage'
export { default as EmployeeProfilePage } from './employee/EmployeeProfilePage'
export { default as NotFoundPage } from './other/NotFoundPage'
export { default as OrganizationStructurePage } from './organizationStructure/OrganizationStructurePage'
export { default as StartPage } from './start/StartPage'
export { default as HomePage } from './home/HomePage'
export { default as UnderConstructionPage } from './other/UnderConstructionPage'
Loading