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 type { GroupedCheck } from "@/types/check";
|
||||
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 {
|
||||
id: string;
|
||||
@@ -24,7 +27,7 @@ const config: Record<string, ConfigItem> = {
|
||||
seo: {
|
||||
id: "seo",
|
||||
text: "SEO",
|
||||
palette: "secondary",
|
||||
palette: "primary",
|
||||
},
|
||||
performance: {
|
||||
id: "performance",
|
||||
@@ -39,7 +42,7 @@ const config: Record<string, ConfigItem> = {
|
||||
accessibility: {
|
||||
id: "accessibility",
|
||||
text: "accessibility",
|
||||
palette: "secondary",
|
||||
palette: "error",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -50,7 +53,10 @@ export const HistogramPageSpeedScores = ({
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
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}>
|
||||
<AreaChart data={checks}>
|
||||
<CartesianGrid
|
||||
|
||||
@@ -36,7 +36,6 @@ const PageSpeedDetailsPage = () => {
|
||||
const monitor = response?.data?.monitor;
|
||||
const stats = response?.data?.stats;
|
||||
const checks = response?.data?.checks || [];
|
||||
console.log(checks);
|
||||
|
||||
const streakDuration = stats?.currentStreakStartedAt
|
||||
? Date.now() - stats?.currentStreakStartedAt
|
||||
|
||||
Reference in new issue
Block a user