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