fix: make tags optional in ChangelogEntry, remove unused VoteState import
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from 'react'
|
||||
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 }[] = [
|
||||
{ id: 'whats-new', label: "What's New" },
|
||||
@@ -86,9 +86,9 @@ export function ChangelogTabs({
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
{entry.tags?.length > 0 && (
|
||||
{(entry.tags?.length ?? 0) > 0 && (
|
||||
<div className="mb-2.5 flex flex-wrap gap-1.5">
|
||||
{entry.tags.map((tag) => (
|
||||
{(entry.tags ?? []).map((tag) => (
|
||||
<span
|
||||
key={tag}
|
||||
className={`rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide ${
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ export type ChangelogEntry = {
|
||||
title: string
|
||||
version: string
|
||||
publishedAt: string
|
||||
tags: string[]
|
||||
tags?: string[]
|
||||
body: unknown[]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user