fix: footer hydration issues

This commit is contained in:
TrèsAbhi committed 2024-05-23 13:17:45 -05:00
1 parent 2a32a1a7cb
commit 4206395f49
3 files changed
+18 -14

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import { config } from 'dotenv';
import { Roboto_Flex } from 'next/font/google'; import { Roboto_Flex } from 'next/font/google';
import { usePathname } from 'next/navigation'; import { usePathname } from 'next/navigation';
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import { Footer } from '../components/Footer';
import Navbar, { NAVBAR_HEIGHT } from '../components/Navbar'; import Navbar, { NAVBAR_HEIGHT } from '../components/Navbar';
import { Party3 } from '../components/Party3'; import { Party3 } from '../components/Party3';
import { Checks } from './components/Checks'; import { Checks } from './components/Checks';
@@ -80,7 +81,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
{children} {children}
</Suspense> */} </Suspense> */}
{/* {!isEmbed && <Footer />} */} {!isEmbed && <Footer />}
</Flex> </Flex>
</Theme> </Theme>
</body> </body>
+14
View File
@@ -0,0 +1,14 @@
import { style } from '@vanilla-extract/css';
export const containerInner = style({
justifyContent: 'space-between',
width: '100%',
maxWidth: 800,
padding: '0 16px',
'@media': {
'screen and (max-width: 640px)': {
justifyContent: 'center',
},
},
});
+2 -13
View File
@@ -3,12 +3,10 @@
import { Code, Flex, Link, Spinner, Text, Theme } from '@radix-ui/themes'; import { Code, Flex, Link, Spinner, Text, Theme } from '@radix-ui/themes';
import { Suspense } from 'react'; import { Suspense } from 'react';
import packageJSON from '../../../package.json'; import packageJSON from '../../../package.json';
import { useWideFormat } from '../../hooks/useWideFormat';
import { WoTBVersion } from './components/WoTBVersion'; import { WoTBVersion } from './components/WoTBVersion';
import * as styles from './index.css';
export function Footer() { export function Footer() {
const wideFormat = useWideFormat(640);
return ( return (
<Theme radius="none"> <Theme radius="none">
<Flex <Flex
@@ -20,16 +18,7 @@ export function Footer() {
backgroundColor: 'var(--color-panel)', backgroundColor: 'var(--color-panel)',
}} }}
> >
<Flex <Flex align="center" wrap="wrap" className={styles.containerInner}>
align="center"
justify={wideFormat ? 'between' : 'center'}
wrap="wrap"
style={{
width: '100%',
maxWidth: 800,
padding: '0 16px',
}}
>
<Flex gap="1" justify="center" align="center"> <Flex gap="1" justify="center" align="center">
<Text color="gray" size="2"> <Text color="gray" size="2">
BlitzKit BlitzKit