From 7070630eaf274e7eb931e032581bb88d876a52df Mon Sep 17 00:00:00 2001 From: Chewbacca Date: Tue, 14 Mar 2023 13:47:24 -0400 Subject: [PATCH] useVersion -> useBackend --- app/soapbox/hooks/{useVersion.ts => useBackend.ts} | 4 ++-- app/soapbox/hooks/useGroupRoles.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename app/soapbox/hooks/{useVersion.ts => useBackend.ts} (83%) diff --git a/app/soapbox/hooks/useVersion.ts b/app/soapbox/hooks/useBackend.ts similarity index 83% rename from app/soapbox/hooks/useVersion.ts rename to app/soapbox/hooks/useBackend.ts index 2ed75f5da..a511abb2a 100644 --- a/app/soapbox/hooks/useVersion.ts +++ b/app/soapbox/hooks/useBackend.ts @@ -7,10 +7,10 @@ import { useInstance } from './useInstance'; * * @returns Backend */ -const useVersion = () => { +const useBackend = () => { const instance = useInstance(); return parseVersion(instance.version); }; -export { useVersion }; \ No newline at end of file +export { useBackend }; \ No newline at end of file diff --git a/app/soapbox/hooks/useGroupRoles.ts b/app/soapbox/hooks/useGroupRoles.ts index eba96a570..dd435ce16 100644 --- a/app/soapbox/hooks/useGroupRoles.ts +++ b/app/soapbox/hooks/useGroupRoles.ts @@ -1,6 +1,6 @@ import { TRUTHSOCIAL } from 'soapbox/utils/features'; -import { useVersion } from './useVersion'; +import { useBackend } from './useBackend'; enum TruthSocialGroupRoles { ADMIN = 'owner', @@ -26,7 +26,7 @@ const roleMap = { * @returns Object */ const useGroupRoles = () => { - const version = useVersion(); + const version = useBackend(); const isTruthSocial = version.software === TRUTHSOCIAL; const selectedRoles = isTruthSocial ? TruthSocialGroupRoles : BaseGroupRoles;