useVersion -> useBackend

This commit is contained in:
Chewbacca 2023-03-14 13:47:24 -04:00
parent 821b90c372
commit 7070630eaf
2 changed files with 4 additions and 4 deletions

View file

@ -7,10 +7,10 @@ import { useInstance } from './useInstance';
*
* @returns Backend
*/
const useVersion = () => {
const useBackend = () => {
const instance = useInstance();
return parseVersion(instance.version);
};
export { useVersion };
export { useBackend };

View file

@ -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;