Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[website] Fix Footer layout shift #40786

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/src/components/home/DesignSystemComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Placeholder() {
return (
<Box
sx={(theme) => ({
height: { xs: 1484, sm: 825, md: 605 },
height: { xs: 1484, sm: 825, md: 601 },
borderRadius: 1,
bgcolor: 'grey.100',
...theme.applyDarkStyles({
Expand All @@ -26,7 +26,7 @@ const MaterialDesignComponents = dynamic(() => import('./MaterialDesignComponent
loading: Placeholder,
});

function DesignSystemComponents() {
export default function DesignSystemComponents() {
const { ref, inView } = useInView({
triggerOnce: true,
threshold: 0,
Expand All @@ -47,5 +47,3 @@ function DesignSystemComponents() {
</Section>
);
}

export default DesignSystemComponents;
2 changes: 1 addition & 1 deletion docs/src/components/home/HeroEnd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { alpha } from '@mui/material/styles';
import Section from 'docs/src/layouts/Section';

function Placeholder() {
return <Box sx={{ height: { xs: 587, sm: 303, md: 289 } }} />;
return <Box sx={{ height: { xs: 616 - 48 * 2, sm: 438 - 80 * 2, md: 461 - 96 * 2 } }} />;
}
const StartToday = dynamic(() => import('./StartToday'), { loading: Placeholder });

Expand Down
8 changes: 4 additions & 4 deletions docs/src/components/home/ProductSuite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const AdvancedShowcase = dynamic(() => import('./AdvancedShowcase'), {
const StoreTemplatesBanner = dynamic(() => import('./StoreTemplatesBanner'));
const DesignKits = dynamic(() => import('./DesignKits'));

function ProductSuite() {
export default function ProductSuite() {
const [productIndex, setProductIndex] = React.useState(0);
const { ref, inView } = useInView({
triggerOnce: true,
Expand Down Expand Up @@ -72,7 +72,7 @@ function ProductSuite() {
md={6}
sx={productIndex === 0 ? { minHeight: { xs: 777, sm: 757, md: 'unset' } } : {}}
>
{inView && (
{inView ? (
<React.Fragment>
<PrefetchStoreTemplateImages />
<PrefetchDesignKitImages />
Expand All @@ -81,11 +81,11 @@ function ProductSuite() {
{productIndex === 2 && <StoreTemplatesBanner />}
{productIndex === 3 && <DesignKits />}
</React.Fragment>
) : (
<Box sx={{ height: { xs: 0, md: 803 } }} />
)}
</Grid>
</Grid>
</Section>
);
}

export default ProductSuite;
4 changes: 3 additions & 1 deletion docs/src/components/home/StartToday.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export default function StartToday() {
overline="Start now"
title={
<Typography variant="h2" sx={{ maxWidth: 460, mb: 1 }}>
Ship your next project <GradientText>faster</GradientText>
Ship your next project
<br />
<GradientText>faster</GradientText>
</Typography>
}
description="Find out why MUI's tools are trusted by thousands of open-source developers and teams around the world."
Expand Down
Loading