useVersion -> useBackend
This commit is contained in:
parent
821b90c372
commit
7070630eaf
2 changed files with 4 additions and 4 deletions
|
@ -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 };
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue