From 7827a8acd2d8c03fd6223d86e8cd274492cdcd0a Mon Sep 17 00:00:00 2001 From: Maniload <1999mani@gmail.com> Date: Fri, 16 May 2025 01:29:56 +0200 Subject: [PATCH] fix: Fixed site query parameter not getting appended to external profile auth URL --- .../external-profile/ExternalProfileAddDialog.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/components/external-profile/ExternalProfileAddDialog.tsx b/src/components/external-profile/ExternalProfileAddDialog.tsx index 1ceabac..b1385a5 100644 --- a/src/components/external-profile/ExternalProfileAddDialog.tsx +++ b/src/components/external-profile/ExternalProfileAddDialog.tsx @@ -55,8 +55,11 @@ interface ExternalProfileAddFormProps { function ExternalProfileAddForm({ preselectedSite, onCancel }: ExternalProfileAddFormProps) { const [site, setSite] = useState(preselectedSite ?? ""); + const authUrl = `${CLIENT_API_URL}/externaltoken/auth`; + return ( - + + External Site @@ -94,12 +97,3 @@ function ExternalProfileAddForm({ preselectedSite, onCancel }: ExternalProfileAd ); } - -function getAuthUrl(site: ExternalProfileSite): string { - switch (site) { - case "AniList": - return `${CLIENT_API_URL}/externaltoken/auth?site=AniList`; - case "MyAnimeList": - return `${CLIENT_API_URL}/externaltoken/auth?site=MyAnimeList`; - } -}