File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { useDeviceType } from '../../hooks/useDeviceType'
1414import EndOfFeedMessage from '../../pages/PostPage/components/EndOfFeedMessage'
1515
1616interface DataPoint {
17- [ key : string ] : string | number
17+ [ key : string ] : string | number | null
1818}
1919
2020interface GraphProps {
Original file line number Diff line number Diff line change @@ -10,15 +10,7 @@ const PriceGraph = () => {
1010 queryFn : getHourlyStatistics ,
1111 } )
1212
13- const graphData = statistics
14- ? transformToGraphData ( statistics ) . map ( entry => {
15- const newEntry : Record < string , number > = { }
16- Object . entries ( entry ) . forEach ( ( [ key , value ] ) => {
17- if ( value !== null ) newEntry [ key ] = value
18- } )
19- return newEntry
20- } )
21- : [ ]
13+ const graphData = statistics ? transformToGraphData ( statistics ) : [ ]
2214
2315 return (
2416 < section className = "flex flex-col gap-5" >
Original file line number Diff line number Diff line change @@ -9,15 +9,7 @@ const PriceGraph = () => {
99 queryFn : getHourlyStatistics ,
1010 } )
1111
12- const graphData = statistics
13- ? transformToGraphData ( statistics ) . map ( entry => {
14- const newEntry : Record < string , number > = { }
15- Object . entries ( entry ) . forEach ( ( [ key , value ] ) => {
16- if ( value !== null ) newEntry [ key ] = value
17- } )
18- return newEntry
19- } )
20- : [ ]
12+ const graphData = statistics ? transformToGraphData ( statistics ) : [ ]
2113
2214 return (
2315 < section className = "bg-gray-10 flex w-full flex-col gap-4 sm:bg-transparent md:gap-10" >
Original file line number Diff line number Diff line change @@ -30,15 +30,7 @@ const MainPage = () => {
3030 queryFn : getHourlyStatistics ,
3131 } )
3232
33- const graphData = statistics
34- ? transformToGraphData ( statistics ) . map ( entry => {
35- const newEntry : Record < string , number > = { }
36- Object . entries ( entry ) . forEach ( ( [ key , value ] ) => {
37- if ( value !== null ) newEntry [ key ] = value
38- } )
39- return newEntry
40- } )
41- : [ ]
33+ const graphData = statistics ? transformToGraphData ( statistics ) : [ ]
4234
4335 const { isModalOpen, setIsModalOpen } = useShowPermissionModal ( )
4436
You can’t perform that action at this time.
0 commit comments