refactor(weather): move top disclosures below board
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m3s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m3s
This commit is contained in:
@@ -64,12 +64,6 @@ export default async function WeatherSessionPage({ params }: WeatherSessionPageP
|
|||||||
badges={<Badge variant="primary">{session.entries.length} membres</Badge>}
|
badges={<Badge variant="primary">{session.entries.length} membres</Badge>}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Info sur les catégories */}
|
|
||||||
<WeatherInfoPanel />
|
|
||||||
|
|
||||||
{/* Évolution dans le temps */}
|
|
||||||
<WeatherTrendChart data={history} currentSessionId={session.id} />
|
|
||||||
|
|
||||||
{/* Live Wrapper + Board */}
|
{/* Live Wrapper + Board */}
|
||||||
<WeatherLiveWrapper
|
<WeatherLiveWrapper
|
||||||
sessionId={session.id}
|
sessionId={session.id}
|
||||||
@@ -94,6 +88,8 @@ export default async function WeatherSessionPage({ params }: WeatherSessionPageP
|
|||||||
canEdit={session.canEdit}
|
canEdit={session.canEdit}
|
||||||
previousEntries={Object.fromEntries(previousEntries)}
|
previousEntries={Object.fromEntries(previousEntries)}
|
||||||
/>
|
/>
|
||||||
|
<WeatherInfoPanel className="mt-6 mb-6" />
|
||||||
|
<WeatherTrendChart data={history} currentSessionId={session.id} />
|
||||||
</WeatherLiveWrapper>
|
</WeatherLiveWrapper>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
import { Disclosure } from '@/components/ui';
|
import { Disclosure } from '@/components/ui';
|
||||||
|
|
||||||
export function WeatherInfoPanel() {
|
interface WeatherInfoPanelProps {
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function WeatherInfoPanel({ className = 'mb-6' }: WeatherInfoPanelProps) {
|
||||||
return (
|
return (
|
||||||
<Disclosure icon="ℹ️" title="Les 4 axes de la météo personnelle" className="mb-6">
|
<Disclosure icon="ℹ️" title="Les 4 axes de la météo personnelle" className={className}>
|
||||||
<div className="grid gap-2.5 sm:grid-cols-2 lg:grid-cols-4">
|
<div className="grid gap-2.5 sm:grid-cols-2 lg:grid-cols-4">
|
||||||
<div>
|
<div>
|
||||||
<p className="mb-0.5 text-xs font-medium text-foreground">☀️ Performance</p>
|
<p className="mb-0.5 text-xs font-medium text-foreground">☀️ Performance</p>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import type { WeatherHistoryPoint } from '@/services/weather';
|
|||||||
interface WeatherTrendChartProps {
|
interface WeatherTrendChartProps {
|
||||||
data: WeatherHistoryPoint[];
|
data: WeatherHistoryPoint[];
|
||||||
currentSessionId?: string;
|
currentSessionId?: string;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const INDICATORS = [
|
const INDICATORS = [
|
||||||
@@ -63,7 +64,11 @@ function buildPath(
|
|||||||
|
|
||||||
const Y_TICKS = [1, 5, 10, 14, 19];
|
const Y_TICKS = [1, 5, 10, 14, 19];
|
||||||
|
|
||||||
export function WeatherTrendChart({ data, currentSessionId }: WeatherTrendChartProps) {
|
export function WeatherTrendChart({
|
||||||
|
data,
|
||||||
|
currentSessionId,
|
||||||
|
className = 'mb-6',
|
||||||
|
}: WeatherTrendChartProps) {
|
||||||
const [hoveredIdx, setHoveredIdx] = useState<number | null>(null);
|
const [hoveredIdx, setHoveredIdx] = useState<number | null>(null);
|
||||||
|
|
||||||
if (data.length < 2) return null;
|
if (data.length < 2) return null;
|
||||||
@@ -73,7 +78,7 @@ export function WeatherTrendChart({ data, currentSessionId }: WeatherTrendChartP
|
|||||||
return (
|
return (
|
||||||
<Disclosure
|
<Disclosure
|
||||||
icon="📈"
|
icon="📈"
|
||||||
className="mb-6"
|
className={className}
|
||||||
title={
|
title={
|
||||||
<>
|
<>
|
||||||
Évolution dans le temps
|
Évolution dans le temps
|
||||||
|
|||||||
Reference in New Issue
Block a user