From 19826048781666cb368f890a4340969d1c0dbc22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Tue, 2 Apr 2024 10:21:51 -0500
Subject: [PATCH] fix: some more floating component removals
---
src/app/layout.tsx | 4 +++-
.../tankopedia/[id]/components/Characteristics/index.tsx | 4 ++++
src/components/ModuleButtons/TankComponentButton.tsx | 5 ++---
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 44d34f094..e68eb4f4c 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -13,6 +13,7 @@ import Navbar from '../components/Navbar';
import PageWrapper from '../components/PageWrapper';
import isDev from '../core/blitzkrieg/isDev';
import { isLocalhost } from '../core/blitzkrieg/isLocalhost';
+import { useFullScreen } from '../hooks/useFullScreen';
import { useApp } from '../stores/app';
import { mintTheme } from '../themes/mint';
@@ -33,6 +34,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
const pathname = usePathname();
const isEmbed = pathname.split('/')[1] === 'embeds';
const [showDevBuildAlert, setShowDevBuildAlert] = useState(false);
+ const isFullScreen = useFullScreen();
useEffect(() => {
setShowDevBuildAlert(
@@ -100,7 +102,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
{children}
- {!isEmbed && (
+ {!isEmbed && !isFullScreen && (
state.protagonist!,
);
+ const isFullScreen = useFullScreen();
const hasImprovedVentilation = useEquipment(102);
const provisions = useProvisions();
const crewMastery = useDuel((state) => state.protagonist!.crewMastery);
@@ -260,6 +262,8 @@ export function Characteristics() {
});
}, [hasImprovedVerticalStabilizer]);
+ if (isFullScreen) return null;
+
return (
diff --git a/src/components/ModuleButtons/TankComponentButton.tsx b/src/components/ModuleButtons/TankComponentButton.tsx
index 95efbb659..661ff8349 100644
--- a/src/components/ModuleButtons/TankComponentButton.tsx
+++ b/src/components/ModuleButtons/TankComponentButton.tsx
@@ -65,12 +65,13 @@ export function TankComponentButton({
/>
)}
+ {children}
+
{discriminator !== undefined && (
)}
-
- {children}
);
}