pagespeed fixes
This commit is contained in:
1 parent
f78ea7ab9c
commit
36208aacea
2 files changed
+10
-5
No files matched your search
@@ -12,7 +12,10 @@ import { HistogramPageSpeedScoresTooltip } from "./HistogramPageSpeedScoresToolt
|
|||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import type { GroupedCheck } from "@/types/check";
|
import type { GroupedCheck } from "@/types/check";
|
||||||
import type { Palette } from "@mui/material/styles";
|
import type { Palette } from "@mui/material/styles";
|
||||||
type PaletteColorKey = Extract<keyof Palette, "primary" | "secondary" | "success" | "warning">;
|
type PaletteColorKey = Extract<
|
||||||
|
keyof Palette,
|
||||||
|
"primary" | "error" | "success" | "warning"
|
||||||
|
>;
|
||||||
|
|
||||||
export interface ConfigItem {
|
export interface ConfigItem {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -24,7 +27,7 @@ const config: Record<string, ConfigItem> = {
|
|||||||
seo: {
|
seo: {
|
||||||
id: "seo",
|
id: "seo",
|
||||||
text: "SEO",
|
text: "SEO",
|
||||||
palette: "secondary",
|
palette: "primary",
|
||||||
},
|
},
|
||||||
performance: {
|
performance: {
|
||||||
id: "performance",
|
id: "performance",
|
||||||
@@ -39,7 +42,7 @@ const config: Record<string, ConfigItem> = {
|
|||||||
accessibility: {
|
accessibility: {
|
||||||
id: "accessibility",
|
id: "accessibility",
|
||||||
text: "accessibility",
|
text: "accessibility",
|
||||||
palette: "secondary",
|
palette: "error",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -50,7 +53,10 @@ export const HistogramPageSpeedScores = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<BaseChart icon={<TrendingUp size={20} strokeWidth={1.5} />} title="Score history">
|
<BaseChart
|
||||||
|
icon={<TrendingUp size={20} strokeWidth={1.5} />}
|
||||||
|
title="Score history"
|
||||||
|
>
|
||||||
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
<ResponsiveContainer width="100%" minWidth={25} height={215}>
|
||||||
<AreaChart data={checks}>
|
<AreaChart data={checks}>
|
||||||
<CartesianGrid
|
<CartesianGrid
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ const PageSpeedDetailsPage = () => {
|
|||||||
const monitor = response?.data?.monitor;
|
const monitor = response?.data?.monitor;
|
||||||
const stats = response?.data?.stats;
|
const stats = response?.data?.stats;
|
||||||
const checks = response?.data?.checks || [];
|
const checks = response?.data?.checks || [];
|
||||||
console.log(checks);
|
|
||||||
|
|
||||||
const streakDuration = stats?.currentStreakStartedAt
|
const streakDuration = stats?.currentStreakStartedAt
|
||||||
? Date.now() - stats?.currentStreakStartedAt
|
? Date.now() - stats?.currentStreakStartedAt
|
||||||
|
|||||||
Reference in new issue
Block a user