Skip to content

Commit

Permalink
Seeden/graph performance 2 (#2470)
Browse files Browse the repository at this point in the history
* fix eslint
remove unused property

* simplify graph and fix performance

* memoize line chart

* typo

* add missing type

* remove unused code

* add @mui/x-charts as peer dep

* updated deps
  • Loading branch information
seeden authored Sep 4, 2024
1 parent b6edf61 commit 9117130
Show file tree
Hide file tree
Showing 10 changed files with 355 additions and 155 deletions.
235 changes: 197 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@mui/material": "5.14.5",
"@mui/styled-engine-sc": "5.12.0",
"@mui/styles": "5.14.5",
"@mui/x-charts": "7.3.2",
"@rollup/plugin-alias": "5.0.0",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-commonjs": "25.0.4",
Expand Down Expand Up @@ -116,6 +117,7 @@
"@mui/material": "^5.14.5",
"@mui/styled-engine-sc": "^5.12.0",
"@mui/styles": "^5.14.5",
"@mui/x-charts": "^7.3.2",
"electron": "^30.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function FormatLargeNumber(props: FormatLargeNumberProps) {
const [locale] = useLocale();

const numberFormat = useMemo(() => new Intl.NumberFormat(locale), [locale]);
const formatedValue = useMemo(() => {
const formattedValue = useMemo(() => {
if (typeof value === 'undefined' || value === null) {
return value;
}
Expand All @@ -42,5 +42,5 @@ export default function FormatLargeNumber(props: FormatLargeNumberProps) {
return numberFormat.format(value);
}, [value, numberFormat, locale]);

return <span>{formatedValue}</span>;
return <span>{formattedValue}</span>;
}
Loading

0 comments on commit 9117130

Please sign in to comment.