Merge pull request #6469 from BlueWallet/debug

Update useIsLargeScreen.ts
This commit is contained in:
GLaDOS 2024-04-28 12:08:46 +00:00 committed by GitHub
commit 856ff682c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ export const useIsLargeScreen = () => {
const updateScreenUsage = () => {
const newWindowWidth = Dimensions.get('window').width;
if (newWindowWidth !== windowWidth) {
console.log(`Window width changed: ${newWindowWidth}`);
console.debug(`Window width changed: ${newWindowWidth}`);
setWindowWidth(newWindowWidth);
}
};
@ -31,7 +31,7 @@ export const useIsLargeScreen = () => {
const isRunningOnTabletOrDesktop = isTablet() || isDesktop;
const halfScreenWidth = windowWidth >= screenWidth / 2;
const condition = isRunningOnTabletOrDesktop && halfScreenWidth;
console.log(
console.debug(
`Window width: ${windowWidth}, Screen width: ${screenWidth}, Is tablet: ${isRunningOnTabletOrDesktop}, Is large screen: ${condition}`,
);
return condition;