mirror of
https://github.com/makeplane/plane.git
synced 2026-02-24 04:00:14 +01:00
[WEB-5179] chore: icon utils code refactor #8458
This commit is contained in:
committed by
GitHub
parent
ec215bb3b1
commit
630d2b9600
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user