[WEB-5179] chore: icon utils code refactor #8458

This commit is contained in:
Anmol Singh Bhatia
2025-12-29 13:31:27 +05:30
committed by GitHub
parent ec215bb3b1
commit 630d2b9600

View File

@@ -16,8 +16,8 @@ import {
FileCode,
Mail,
Chrome,
Link2,
} from "lucide-react";
import { LinkIcon } from "@plane/propel/icons";
type IconMatcher = {
pattern: RegExp;
@@ -60,5 +60,5 @@ export const getIconForLink = (url: string) => {
const allMatchers = [...SOCIAL_MEDIA_MATCHERS, ...PRODUCTIVITY_MATCHERS, ...FILE_TYPE_MATCHERS, ...OTHER_MATCHERS];
const matchedIcon = allMatchers.find(({ pattern }) => pattern.test(lowerUrl));
return matchedIcon?.icon ?? LinkIcon;
return matchedIcon?.icon ?? Link2;
};