Skip to content

Commit

Permalink
Merge pull request #1118 from DTS-STN/fix-docker-error
Browse files Browse the repository at this point in the history
use useSessionStorage hook
  • Loading branch information
MarcoGoC authored Nov 20, 2024
2 parents 87e21a1 + ddd6153 commit 09be97e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pages/results/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ const Results: NextPage<{ adobeAnalyticsUrl: string }> = ({
const language =
langx === Language.EN || langx === Language.FR ? langx : Language.EN

const response: ResponseSuccess | ResponseError = JSON.parse(
sessionStorage.getItem('calculationResults') || '{}'
)
const [response, setResponse]: [any, (value: any) => void] =
useSessionStorage('calculationResults', {})

const savedInputs = JSON.parse(
sessionStorage.getItem('resultPageInputs') || '{}'
)
const [savedInputs, setSavedInputs]: [any, (value: any) => void] =
useSessionStorage('resultPageInputs', {})

const inputHelper = new InputHelper(savedInputs.inputs, setInputs, language)

Expand Down

0 comments on commit 09be97e

Please sign in to comment.