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

View File

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

View File

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