mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 02:09:10 +01:00
11 lines
369 B
TypeScript
11 lines
369 B
TypeScript
import { useContext } from 'react';
|
|
import { LargeScreenContext } from '../components/Context/LargeScreenProvider';
|
|
|
|
export const useIsLargeScreen = (): boolean => {
|
|
const context = useContext(LargeScreenContext);
|
|
if (context === undefined) {
|
|
throw new Error('useIsLargeScreen must be used within a LargeScreenProvider');
|
|
}
|
|
return context.isLargeScreen;
|
|
};
|