chore(web): remove unused data

This commit is contained in:
JzoNg 2026-04-28 16:34:00 +08:00
parent 70fd4a5c88
commit c574363cf6
10 changed files with 2 additions and 13 deletions

View File

@ -154,7 +154,6 @@ const mockSnippet: SnippetDetail = {
id: 'snippet-1',
name: 'Social Media Repurposer',
description: 'Turn one blog post into multiple social media variations.',
author: 'Dify',
updatedAt: '2026-03-25 10:00',
usage: '12',
icon: '🤖',

View File

@ -11,7 +11,6 @@ const mockSnippet: SnippetDetail = {
id: 'snippet-1',
name: 'Social Media Repurposer',
description: 'Turn one blog post into multiple social media variations.',
author: 'Dify',
updatedAt: '2026-03-25 10:00',
usage: '12',
icon: '🤖',

View File

@ -91,7 +91,6 @@ const mockSnippetDetail: SnippetDetailPayload = {
id: 'snippet-1',
name: 'Tone Rewriter',
description: 'A static snippet mock.',
author: 'Evan',
updatedAt: 'Updated 2h ago',
usage: 'Used 19 times',
icon: '🪄',

View File

@ -79,7 +79,6 @@ const mockSnippetDetail: SnippetDetailPayload = {
id: 'snippet-1',
name: 'Tone Rewriter',
description: 'A static snippet mock.',
author: 'Evan',
updatedAt: '2024-03-24',
usage: '19',
icon: '🪄',

View File

@ -66,7 +66,6 @@ const createSnippet = (overrides: Partial<SnippetDetail> = {}): SnippetDetail =>
id: 'snippet-1',
name: 'Snippet Title',
description: 'Snippet description',
author: 'tester',
updatedAt: '2026-04-15',
usage: '42',
icon: 'emoji',

View File

@ -172,7 +172,6 @@ const payload: SnippetDetailPayload = {
id: 'snippet-1',
name: 'Snippet',
description: 'desc',
author: '',
updatedAt: '2026-03-29 10:00',
usage: '0',
icon: '',

View File

@ -22,7 +22,7 @@ const SnippetDetailCard: FC<SnippetDetailCardProps> = ({
const { data: membersData } = useMembers()
const { data: workflow } = useSnippetPublishedWorkflow(snippet.id)
const authorName = useMemo(() => {
const creatorName = useMemo(() => {
const member = membersData?.accounts?.find(member => member.id === snippet.created_by)
return member?.name || t('unknownUser')
}, [membersData?.accounts, snippet.created_by, t])
@ -90,7 +90,7 @@ const SnippetDetailCard: FC<SnippetDetailCardProps> = ({
)}
</div>
<div className="pt-3 system-xs-regular text-text-tertiary">
{authorName}
{creatorName}
</div>
</div>
)

View File

@ -8,7 +8,6 @@ export type SnippetListItem = {
id: string
name: string
description: string
author: string
updatedAt: string
usage: string
icon: string
@ -21,7 +20,6 @@ export type SnippetDetail = {
id: string
name: string
description: string
author: string
updatedAt: string
usage: string
icon: string

View File

@ -15,7 +15,6 @@ const getSnippetListMock = (): SnippetListItem[] => ([
id: 'snippet-1',
name: 'Tone Rewriter',
description: 'Rewrites rough drafts into a concise, professional tone for internal stakeholder updates.',
author: 'Evan',
updatedAt: 'Updated 2h ago',
usage: 'Used 19 times',
icon: '🪄',
@ -28,7 +27,6 @@ const createSnippetMock = (snippetId: string): SnippetListItem => ({
id: snippetId,
name: 'Tone Rewriter',
description: 'Rewrites rough drafts into a concise, professional tone for internal stakeholder updates.',
author: 'Evan',
updatedAt: 'Updated 2h ago',
usage: 'Used 19 times',
icon: '🪄',

View File

@ -70,7 +70,6 @@ const toSnippetListItem = (snippet: SnippetSummary): SnippetListItemUIModel => {
id: snippet.id,
name: snippet.name,
description: snippet.description,
author: '',
updatedAt: formatTimestamp(snippet.updated_at),
usage: String(snippet.use_count ?? 0),
icon: getSnippetIcon(snippet.icon_info),