-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: Dont use fnr in path * Hardcode basename for internflate * Reset url when switching tab to dialog or aktivitetsplan * Redirect to base if no dialog * Add redirect to dialog without fnr * Use link to aktivitetsplan without fnr * Fix link when aktivitetsplan-url is not set * Use correct fallback operator * Cleanup * Fix cache invalidation option name * Fix redirect for /ny * Use no-cache from nais-action * Split redirects into separate components * Test cdn-no-cache-paths * don't use nais action no-cache argument * fix ny redirect queryPart --------- Co-authored-by: Hans Petter Simonsen <[email protected]> Co-authored-by: johannetronstad <[email protected]>
- Loading branch information
1 parent
af61017
commit f31753d
Showing
7 changed files
with
39 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import React, { MouseEvent } from 'react'; | ||
import { MouseEvent } from 'react'; | ||
|
||
import { AKTIVITETSPLAN_URL } from '../../constants'; | ||
import { getContextPath } from '../utils/utils'; | ||
|
||
export const aktivitetLenke = (aktivitetId: string) => { | ||
return `${AKTIVITETSPLAN_URL}/aktivitet/vis/${aktivitetId}`; | ||
return `${AKTIVITETSPLAN_URL || ''}/aktivitet/vis/${aktivitetId}`; | ||
}; | ||
|
||
export const visAktivitetsplan = (aktivitetID: string, fnrContext?: string) => (event: MouseEvent) => { | ||
if (!fnrContext) { | ||
return; | ||
} | ||
export const visAktivitetsplan = (aktivitetID: string) => (event: MouseEvent) => { | ||
event.preventDefault(); | ||
window.history.replaceState({}, 'aktivitetsplan', `${getContextPath()}/${fnrContext}/aktivitet/vis/${aktivitetID}`); | ||
window.history.replaceState({}, 'aktivitetsplan', `/aktivitet/vis/${aktivitetID}`); | ||
window.dispatchEvent(new CustomEvent('visAktivitetsplan', { detail: aktivitetID })); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters