add frontend docker build and deploy and gitea action

This commit is contained in:
2026-02-19 09:07:01 -08:00
parent 402ae9bf9b
commit 6c2379976d
12 changed files with 176 additions and 14 deletions
+8 -13
View File
@@ -1,25 +1,20 @@
import { ScatterChart, Scatter, XAxis, YAxis, Tooltip, ResponsiveContainer } from "recharts";
import {lazy, Suspense } from "react"
import WeatherHistory from '@/hooks/weather-history'
const Chart = lazy(() => import("./temperature-plot-chart"))
function TemperaturePlot() {
const {data, isLoading, error} = WeatherHistory()
if (isLoading) return <p>Loading...</p>
if (error) return <p>Error: {error.message}</p>
return (
<div className="w-full">
<ResponsiveContainer width="100%" height={400}>
<ScatterChart data={data}>
<XAxis dataKey="id" />
<YAxis />
<Tooltip />
<Scatter dataKey="temp" fill="#6366f1" />
</ScatterChart>
</ResponsiveContainer>
</div>
<Suspense fallback={<div className="h-[400-px]" />}>
<Chart data={data} />
</Suspense>
)
}
export default TemperaturePlot