mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 03:26:17 +00:00
29 lines
850 B
TypeScript
29 lines
850 B
TypeScript
|
|
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"
|
||
|
|
import NetworkTrafficChart from "@/components/NetworkTrafficChart" // Ensure this path is correct
|
||
|
|
|
||
|
|
const timeframe = "1h" // Declare timeframe variable
|
||
|
|
const handleTotalsCalculated = (totals) => {
|
||
|
|
console.log("Totals calculated:", totals)
|
||
|
|
} // Declare handleTotalsCalculated function
|
||
|
|
|
||
|
|
export default function Page({ id }) {
|
||
|
|
return (
|
||
|
|
<>
|
||
|
|
{/* ... other code here ... */}
|
||
|
|
<Card>
|
||
|
|
<CardHeader>
|
||
|
|
<CardTitle>Network Traffic</CardTitle>
|
||
|
|
</CardHeader>
|
||
|
|
<CardContent>
|
||
|
|
<NetworkTrafficChart
|
||
|
|
timeframe={timeframe}
|
||
|
|
onTotalsCalculated={handleTotalsCalculated}
|
||
|
|
refreshInterval={30000}
|
||
|
|
/>
|
||
|
|
</CardContent>
|
||
|
|
</Card>
|
||
|
|
{/* ... rest of code here ... */}
|
||
|
|
</>
|
||
|
|
)
|
||
|
|
}
|