Merged in fix/LOY-400-make-contentstack-data-optional (pull request #3266)
fix(LOY-400): made contentstack data optional so the whole page does not crash if it's empty. * fix(LOY-400): made contentstack data optional so the whole page does not crash if it's empty. * Merged in fix/LOY-400-make-contentstack-data-optional-2 (pull request #3269) Fix/LOY-400 make contentstack data optional 2 * Test * . * Correct ref tag * refactor * Correct key * fix(LOY-400): cleaned up Approved-by: Linus Flood Approved-by: Matilda Landström
This commit is contained in:
@@ -67,7 +67,11 @@ export function UsePointsModal({
|
||||
|
||||
const bookLink = `${pathname}?${searchParams}`
|
||||
|
||||
const [items] = contentData.all_usepointsmodal.items
|
||||
const items = contentData?.all_usepointsmodal?.items?.[0]
|
||||
|
||||
if (!items) {
|
||||
return null
|
||||
}
|
||||
|
||||
const linkListItems = items.link_group.map((link) => ({
|
||||
text: link.text,
|
||||
|
||||
Reference in New Issue
Block a user