fix: make tags optional in ChangelogEntry, remove unused VoteState import

This commit is contained in:
2026-03-30 16:40:35 -04:00
parent d387484872
commit 2d55af4de2
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { PortableTextRenderer } from '@/components/PortableTextRenderer' import { PortableTextRenderer } from '@/components/PortableTextRenderer'
import type { ChangelogEntry, RoadmapItemData, Tab, VoteState } from '@/types/changelog' import type { ChangelogEntry, RoadmapItemData, Tab } from '@/types/changelog'
const TABS: { id: Tab; label: string }[] = [ const TABS: { id: Tab; label: string }[] = [
{ id: 'whats-new', label: "What's New" }, { id: 'whats-new', label: "What's New" },
@@ -86,9 +86,9 @@ export function ChangelogTabs({
</p> </p>
</div> </div>
<div> <div>
{entry.tags?.length > 0 && ( {(entry.tags?.length ?? 0) > 0 && (
<div className="mb-2.5 flex flex-wrap gap-1.5"> <div className="mb-2.5 flex flex-wrap gap-1.5">
{entry.tags.map((tag) => ( {(entry.tags ?? []).map((tag) => (
<span <span
key={tag} key={tag}
className={`rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide ${ className={`rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide ${
+1 -1
View File
@@ -3,7 +3,7 @@ export type ChangelogEntry = {
title: string title: string
version: string version: string
publishedAt: string publishedAt: string
tags: string[] tags?: string[]
body: unknown[] body: unknown[]
} }