bigbuffet-rw/app/soapbox/hooks/useBackend.ts

16 lines
290 B
TypeScript
Raw Normal View History

2023-03-13 06:47:23 -07:00
import { parseVersion } from 'soapbox/utils/features';
import { useInstance } from './useInstance';
/**
* Get the Backend version.
*
* @returns Backend
*/
2023-03-14 10:47:24 -07:00
const useBackend = () => {
2023-03-13 06:47:23 -07:00
const instance = useInstance();
return parseVersion(instance.version);
};
2023-03-14 10:47:24 -07:00
export { useBackend };