From f77f16fd5ad4eaae8f4d70ed70fdedf9f6f541b8 Mon Sep 17 00:00:00 2001 From: Sam Samskies Date: Mon, 13 Feb 2023 22:26:17 -0600 Subject: [PATCH] Improve var names --- src/Element/HyperText.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Element/HyperText.tsx b/src/Element/HyperText.tsx index d05c13e..78aada1 100644 --- a/src/Element/HyperText.tsx +++ b/src/Element/HyperText.tsx @@ -46,11 +46,11 @@ export default function HyperText({ link, creator }: { link: string; creator: He const tidalId = TidalRegex.test(a) && RegExp.$1; const soundcloundId = SoundCloudRegex.test(a) && RegExp.$1; const mixcloudId = MixCloudRegex.test(a) && RegExp.$1; - const spotifyId = SpotifyRegex.test(a); - const twitchId = TwitchRegex.test(a); - const appleMusicId = AppleMusicRegex.test(a); + const isSpotifyLink = SpotifyRegex.test(a); + const isTwitchLink = TwitchRegex.test(a); + const isAppleMusicLink = AppleMusicRegex.test(a); const extension = FileExtensionRegex.test(url.pathname.toLowerCase()) && RegExp.$1; - if (extension && !appleMusicId) { + if (extension && !isAppleMusicLink) { switch (extension) { case "gif": case "jpg": @@ -113,11 +113,11 @@ export default function HyperText({ link, creator }: { link: string; creator: He return ; } else if (mixcloudId) { return ; - } else if (spotifyId) { + } else if (isSpotifyLink) { return ; - } else if (twitchId) { + } else if (isTwitchLink) { return ; - } else if (appleMusicId) { + } else if (isAppleMusicLink) { return ; } else { return (