Skip to content

Commit

Permalink
[extension] - refactor: streamline CitationIconType definition
Browse files Browse the repository at this point in the history
 - Simplify the `CitationIconType` by directly using a union type instead of an array constant mapping
  • Loading branch information
JulesBelveze committed Dec 18, 2024
1 parent 9a8bdcd commit 4a7c459
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions extension/app/src/components/markdown/MarkdownCitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,18 @@ import {
} from "@dust-tt/sparkle";
import type { SVGProps } from "react";

const CITATION_ICONS = [
"confluence",
"document",
"github",
"google_drive",
"intercom",
"microsoft",
"zendesk",
"notion",
"slack",
"image",
"snowflake",
] as const;

export type CitationIconType = (typeof CITATION_ICONS)[number];
export type CitationIconType =
| "confluence"
| "document"
| "github"
| "google_drive"
| "intercom"
| "microsoft"
| "zendesk"
| "notion"
| "slack"
| "image"
| "snowflake";

export const citationIconMap: Record<
CitationIconType,
Expand Down

0 comments on commit 4a7c459

Please sign in to comment.