fix: some more floating component removals

This commit is contained in:
TrèsAbhi committed 2024-04-02 10:21:51 -05:00
1 parent 9ef6eea4a9
commit 1982604878
3 files changed
+9 -4

No files matched your search

+3 -1
View File
@@ -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) {
<Flex direction="column">{children}</Flex>
{!isEmbed && (
{!isEmbed && !isFullScreen && (
<PageWrapper>
<a
target="_blank"
@@ -30,6 +30,7 @@ import {
import { unionBoundingBox } from '../../../../../../core/blitzkrieg/unionBoundingBox';
import { useConsumable } from '../../../../../../hooks/useConsumable';
import { useEquipment } from '../../../../../../hooks/useEquipment';
import { useFullScreen } from '../../../../../../hooks/useFullScreen';
import { useProvision } from '../../../../../../hooks/useProvision';
import { useProvisions } from '../../../../../../hooks/useProvisions';
import { mutateDuel, useDuel } from '../../../../../../stores/duel';
@@ -43,6 +44,7 @@ export function Characteristics() {
const { tank, turret, gun, engine, track, shell } = useDuel(
(state) => 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 (
<Flex direction="column" gap="8" style={{ width: '100%' }}>
<Flex direction="column" gap="2">
@@ -65,12 +65,13 @@ export function TankComponentButton({
/>
)}
{children}
{discriminator !== undefined && (
<Text
size="1"
style={{
textShadow: '0 0 4px black',
zIndex: 1,
position: 'absolute',
top: '50%',
right: 8,
@@ -81,8 +82,6 @@ export function TankComponentButton({
{discriminator}
</Text>
)}
{children}
</Button>
);
}