Skip to content

Commit

Permalink
Update for Cumulative Layout Shift
Browse files Browse the repository at this point in the history
  • Loading branch information
blz committed Dec 23, 2024
1 parent 2fd97c5 commit fb13c6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/routes/collect/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ async function fetchData(fetch: any, product: string) {
return {data: data, maxY: maxY};
}

export const load: PageServerLoad = async ({ fetch, params }) => {
console.log("load")
export const load: PageServerLoad = async ({ fetch }) => {
const base: IStateWrapper = parse(PUBLIC_STATE);
const productsList = base.cards.products;

Expand Down
8 changes: 5 additions & 3 deletions src/routes/collect/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
const localData = data.props as CollectPage;
showSummary(localData.summaryData);
localData.dataGroups.forEach((dataGroup, index) => {
console.log(dataGroup.data);
updatePlot(dataGroup.data, index, products[index], dataGroup.maxY);
});
});
Expand All @@ -88,15 +87,18 @@
margin: 1%;
}
.graph {
margin: 1%;
margin: 1% 1% 2%;
width: 640px;
height: 360px;
flex: 1 1 calc(33.33% - 2%);
max-width: calc(33.33% - 2%);
}
@media (max-width: 768px) {
.graph {
flex: 1 1 100%;
max-width: 100%;
margin: 1%;
height: auto;
margin: 0 1% 2%;
}
}
.summary-graphs-container{
Expand Down

0 comments on commit fb13c6b

Please sign in to comment.