feat: make automatisch info available

This commit is contained in:
Ali BARIN
2023-03-06 18:04:47 +00:00
parent 66be6d1e89
commit 26d8e5856a
5 changed files with 77 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
import * as React from 'react';
import { AutomatischInfoContext } from 'contexts/AutomatischInfo';
type UseAutomatischInfoReturn = {
isCloud: boolean;
};
export default function useAutomatischInfo(): UseAutomatischInfoReturn {
const automatischInfoContext = React.useContext(AutomatischInfoContext);
return {
isCloud: automatischInfoContext.isCloud,
};
}

View File

@@ -0,0 +1,7 @@
import useAutomatischInfo from './useAutomatischInfo';
export default function useCloud(): boolean {
const { isCloud } = useAutomatischInfo();
return isCloud;
}