refactor(SW-438): update namings

This commit is contained in:
Matilda Landström
2024-10-16 09:43:32 +02:00
parent 76063e1757
commit 8eb822da16
3 changed files with 4 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ export default function Sidebar({ blocks }: SidebarProps) {
/> />
) )
case SidebarEnums.blocks.Shortcuts: case SidebarEnums.blocks.QuickLinks:
return <ShortcutsList {...block.shortcuts} /> return <ShortcutsList {...block.shortcuts} />
default: default:

View File

@@ -7,9 +7,9 @@ import { SidebarEnums } from "@/types/enums/sidebar"
export const quickLinksSchema = z export const quickLinksSchema = z
.object({ .object({
typename: z typename: z
.literal(SidebarEnums.blocks.Shortcuts) .literal(SidebarEnums.blocks.QuickLinks)
.optional() .optional()
.default(SidebarEnums.blocks.Shortcuts), .default(SidebarEnums.blocks.QuickLinks),
}) })
.merge(shortcutsBlockSchema) .merge(shortcutsBlockSchema)

View File

@@ -5,6 +5,6 @@ export namespace SidebarEnums {
DynamicContent = "DynamicContent", DynamicContent = "DynamicContent",
JoinLoyaltyContact = "JoinLoyaltyContact", JoinLoyaltyContact = "JoinLoyaltyContact",
ScriptedCard = "ScriptedCard", ScriptedCard = "ScriptedCard",
Shortcuts = "Shortcuts", QuickLinks = "QuickLinks",
} }
} }