Skip to content

Commit

Permalink
temp: logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Clemog committed Sep 14, 2023
1 parent b01a9a8 commit 9e9180f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions source/components/localisation/useLocalisation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ const API = '/.netlify/functions/geolocation'
export default () => {
const dispatch = useDispatch()
const localisation = useSelector((state: AppState) => state.localisation)
const iframeLocalisationOption = useSelector(
const iframeLocalisationOption: string | undefined = useSelector(
(state: AppState) => state?.iframeOptions?.iframeLocalisation
)

console.log(iframeLocalisationOption)

const currentLang = useSelector(
(state: AppState) => state.currentLang
).toLowerCase()

const iframeRegionParams: Region | undefined =
iframeLocalisationOption && useSupportedRegion(iframeLocalisationOption)
const iframeRegionParams: Region | undefined = useSupportedRegion(
iframeLocalisationOption
)

console.log(iframeRegionParams)
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion source/components/localisation/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function useSupportedRegion(
const supportedRegions: SupportedRegions = useSelector(
(state: AppState) => state.supportedRegions
)

console.log(supportedRegions)
// Check for undefined AFTER useSelector, because hooks can't be called conditionally
if (inputCode === undefined) {
return undefined
Expand Down

0 comments on commit 9e9180f

Please sign in to comment.