This commit is contained in:
Hristo Nedelkov 2023-08-11 14:29:06 +03:00
parent eed7a6d447
commit 6b052c9b17
3 changed files with 6 additions and 4 deletions

View File

@ -12,7 +12,7 @@ type ChartData = {
id: string
color: string
data: DataPoint[]
maxMemory?: number
maxValue?: number
}
type DeviceMemoryProps = {
@ -28,7 +28,7 @@ const DeviceMemory = ({ currentMemory, maxMemory }: DeviceMemoryProps) => {
x: index + 1,
y: yValue,
})),
maxMemory: maxMemory,
maxValue: maxMemory,
},
]
const currentLoad =

View File

@ -1,6 +1,7 @@
import LayoutComponent from './LayoutComponent'
import './LandingPage.css'
import QuickStartBar from './QuickStartBar'
import DeviceMemory from './DeviceMemoryHealth'
function LandingPage() {
return (
@ -14,6 +15,7 @@ function LandingPage() {
function Content() {
return (
<div className="container-inner landing-page">
<DeviceMemory currentMemory={[12,24,14,12,4,60]} maxMemory={65}/>
<header>
<div>
<div>

View File

@ -7,14 +7,14 @@ interface DataPoint {
interface ChartData {
id: string
data: DataPoint[]
maxMemory?: number
maxValue?: number
}
interface StandartLineChartProps {
data: ChartData[]
}
const StandartLineChart = ({ data }: StandartLineChartProps) => {
const maxMemory = data[0].maxMemory || 'auto'
const maxMemory = data[0].maxValue || 'auto'
return (
<ResponsiveLine