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>}
|
||||
/>
|
||||
|
||||
{/* Info sur les catégories */}
|
||||
<WeatherInfoPanel />
|
||||
|
||||
{/* Évolution dans le temps */}
|
||||
<WeatherTrendChart data={history} currentSessionId={session.id} />
|
||||
|
||||
{/* Live Wrapper + Board */}
|
||||
<WeatherLiveWrapper
|
||||
sessionId={session.id}
|
||||
@@ -94,6 +88,8 @@ export default async function WeatherSessionPage({ params }: WeatherSessionPageP
|
||||
canEdit={session.canEdit}
|
||||
previousEntries={Object.fromEntries(previousEntries)}
|
||||
/>
|
||||
<WeatherInfoPanel className="mt-6 mb-6" />
|
||||
<WeatherTrendChart data={history} currentSessionId={session.id} />
|
||||
</WeatherLiveWrapper>
|
||||
</main>
|
||||
);
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
|
||||
import { Disclosure } from '@/components/ui';
|
||||
|
||||
export function WeatherInfoPanel() {
|
||||
interface WeatherInfoPanelProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function WeatherInfoPanel({ className = 'mb-6' }: WeatherInfoPanelProps) {
|
||||
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>
|
||||
<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 {
|
||||
data: WeatherHistoryPoint[];
|
||||
currentSessionId?: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const INDICATORS = [
|
||||
@@ -63,7 +64,11 @@ function buildPath(
|
||||
|
||||
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);
|
||||
|
||||
if (data.length < 2) return null;
|
||||
@@ -73,7 +78,7 @@ export function WeatherTrendChart({ data, currentSessionId }: WeatherTrendChartP
|
||||
return (
|
||||
<Disclosure
|
||||
icon="📈"
|
||||
className="mb-6"
|
||||
className={className}
|
||||
title={
|
||||
<>
|
||||
Évolution dans le temps
|
||||
|
||||
Reference in New Issue
Block a user