16 lines
No EOL
290 B
TypeScript
16 lines
No EOL
290 B
TypeScript
import { parseVersion } from 'soapbox/utils/features';
|
|
|
|
import { useInstance } from './useInstance';
|
|
|
|
/**
|
|
* Get the Backend version.
|
|
*
|
|
* @returns Backend
|
|
*/
|
|
const useVersion = () => {
|
|
const instance = useInstance();
|
|
|
|
return parseVersion(instance.version);
|
|
};
|
|
|
|
export { useVersion }; |