mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-19 21:18:25 +02:00
Add a widget to display the current date alongside weather information
Introduce a new DateWidget component, integrated into the main layout to display the current date, and refactor WeatherWidget to remove redundant date formatting. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d43bd811-9372-45a7-8ac9-4a954c0538e1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d43bd811-9372-45a7-8ac9-4a954c0538e1/dB3dp7l
This commit is contained in:
1 parent
7a083a0203
commit
369638f3d6
3 files changed
+41
-13
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Calendar } from "lucide-react";
|
||||
|
||||
const formatDate = (date: Date): string => {
|
||||
return date.toLocaleDateString('fr-FR', {
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default function DateWidget() {
|
||||
const now = new Date();
|
||||
|
||||
return (
|
||||
<Card className="bg-gradient-to-r from-white to-slate-50 dark:from-slate-800 dark:to-slate-900 border-slate-200 dark:border-slate-700 shadow-lg hover:shadow-xl transition-all duration-300">
|
||||
<CardContent className="p-4">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-2 bg-slate-100 dark:bg-slate-700 rounded-full">
|
||||
<Calendar className="h-5 w-5 text-slate-600 dark:text-slate-300" />
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<span className="text-slate-700 dark:text-slate-200 font-semibold text-sm capitalize">
|
||||
{formatDate(now)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user