fix fallback
This commit is contained in:
1 parent
816a1607a1
commit
746ed4a3c1
5 files changed
+19
-48
No files matched your search
@@ -19,12 +19,7 @@ export const BulletPointCheck = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack direction="row" gap={theme.spacing(6)} alignItems="center">
|
||||||
direction="row"
|
|
||||||
className="check"
|
|
||||||
gap={theme.spacing(6)}
|
|
||||||
alignItems="center"
|
|
||||||
>
|
|
||||||
<Check
|
<Check
|
||||||
size={16}
|
size={16}
|
||||||
strokeWidth={1.5}
|
strokeWidth={1.5}
|
||||||
@@ -42,7 +37,6 @@ export const BulletPointCheck = ({
|
|||||||
fontWeight={450}
|
fontWeight={450}
|
||||||
sx={{
|
sx={{
|
||||||
opacity: 0.9,
|
opacity: 0.9,
|
||||||
whiteSpace: 'nowrap',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ import { Button } from "@/components/inputs";
|
|||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import type { BoxProps } from "@mui/material";
|
import type { StackProps } from "@mui/material/Stack";
|
||||||
interface BaseFallbackProps extends BoxProps {
|
|
||||||
|
interface BaseFallbackProps extends StackProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +22,8 @@ export const BaseFallback: React.FC<BaseFallbackProps> = ({
|
|||||||
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
|
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Stack
|
||||||
|
alignItems={"center"}
|
||||||
margin={isSmall ? "inherit" : "auto"}
|
margin={isSmall ? "inherit" : "auto"}
|
||||||
marginTop={isSmall ? "33%" : "10%"}
|
marginTop={isSmall ? "33%" : "10%"}
|
||||||
width={{
|
width={{
|
||||||
@@ -30,51 +32,26 @@ export const BaseFallback: React.FC<BaseFallbackProps> = ({
|
|||||||
lg: "50%",
|
lg: "50%",
|
||||||
xl: "40%",
|
xl: "40%",
|
||||||
}}
|
}}
|
||||||
padding={theme.spacing(16)}
|
padding={{ xs: theme.spacing(4), md: theme.spacing(16) }}
|
||||||
bgcolor={theme.palette.primary.main}
|
bgcolor={theme.palette.primary.main}
|
||||||
position="relative"
|
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.primary.lowContrast}
|
borderColor={theme.palette.primary.lowContrast}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
overflow="hidden"
|
|
||||||
sx={{
|
sx={{
|
||||||
borderStyle: "dashed",
|
borderStyle: "dashed",
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<Box sx={{ marginTop: "100px" }}>
|
<Box
|
||||||
<Stack
|
mt={theme.spacing(32)}
|
||||||
alignItems="center"
|
mb={theme.spacing(8)}
|
||||||
gap={theme.spacing(20)}
|
width={"80%"}
|
||||||
sx={{
|
maxWidth={216}
|
||||||
width: "fit-content",
|
>
|
||||||
margin: "auto",
|
<SkeletonCard showHalo={true} />
|
||||||
marginTop: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
zIndex: 1,
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<SkeletonCard showHalo={true} />
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<Stack
|
|
||||||
gap={theme.spacing(4)}
|
|
||||||
alignItems="center"
|
|
||||||
maxWidth={"300px"}
|
|
||||||
zIndex={1}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
{children}
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ interface SkeletonCardProps {
|
|||||||
* Default size is 60% of original design
|
* Default size is 60% of original design
|
||||||
*/
|
*/
|
||||||
const SkeletonCard: React.FC<SkeletonCardProps> = ({
|
const SkeletonCard: React.FC<SkeletonCardProps> = ({
|
||||||
width = 216,
|
width = "100%",
|
||||||
showHalo = true,
|
showHalo = true,
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|||||||
@@ -789,7 +789,7 @@
|
|||||||
"packetsSent": "Packets Sent",
|
"packetsSent": "Packets Sent",
|
||||||
"pageSpeedMonitor": {
|
"pageSpeedMonitor": {
|
||||||
"fallback": {
|
"fallback": {
|
||||||
"actionButton": "Let's create your first PageSpeed monitor!",
|
"actionButton": "Create a PageSpeed monitor!",
|
||||||
"checks": [
|
"checks": [
|
||||||
"Report on the user experience of a page",
|
"Report on the user experience of a page",
|
||||||
"Help analyze webpage speed",
|
"Help analyze webpage speed",
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const PageSpeedMonitorsPage = () => {
|
|||||||
return (
|
return (
|
||||||
<MonitorBasePageWithStates
|
<MonitorBasePageWithStates
|
||||||
loading={isValidating}
|
loading={isValidating}
|
||||||
error={error}
|
error={true}
|
||||||
items={monitors}
|
items={monitors}
|
||||||
page="pageSpeed"
|
page="pageSpeed"
|
||||||
actionLink="/pagespeed/create"
|
actionLink="/pagespeed/create"
|
||||||
|
|||||||
Reference in new issue
Block a user