widgets email and news 3
This commit is contained in:
parent
25fc47ecb3
commit
735d1e2241
@ -9,9 +9,9 @@ import { Parole } from "@/components/parole";
|
|||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<main className="container mx-auto py-6 px-8 space-y-6">
|
<main className="container mx-auto px-6 mt-8 space-y-4">
|
||||||
{/* First row */}
|
{/* First row */}
|
||||||
<div className="grid grid-cols-12 gap-6">
|
<div className="grid grid-cols-12 gap-4">
|
||||||
<div className="col-span-3">
|
<div className="col-span-3">
|
||||||
<QuoteCard />
|
<QuoteCard />
|
||||||
</div>
|
</div>
|
||||||
@ -27,7 +27,7 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Second row */}
|
{/* Second row */}
|
||||||
<div className="grid grid-cols-12 gap-6">
|
<div className="grid grid-cols-12 gap-4">
|
||||||
<div className="col-span-6">
|
<div className="col-span-6">
|
||||||
<Email />
|
<Email />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -100,24 +100,24 @@ export function Email() {
|
|||||||
<RefreshCw className="h-4 w-4" />
|
<RefreshCw className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="p-4">
|
<CardContent className="p-3">
|
||||||
{error ? (
|
{error ? (
|
||||||
<p className="text-center text-red-500">{error}</p>
|
<p className="text-center text-red-500">{error}</p>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-3 max-h-[240px] overflow-y-auto pr-2">
|
<div className="space-y-2 max-h-[220px] overflow-y-auto">
|
||||||
{emails.length === 0 ? (
|
{emails.length === 0 ? (
|
||||||
<p className="text-center text-gray-500">No emails available</p>
|
<p className="text-center text-gray-500">No emails available</p>
|
||||||
) : (
|
) : (
|
||||||
emails.map((email) => (
|
emails.map((email) => (
|
||||||
<div
|
<div
|
||||||
key={email.id}
|
key={email.id}
|
||||||
className="p-3 hover:bg-gray-50/50 rounded-lg transition-colors"
|
className="p-2 hover:bg-gray-50/50 rounded-lg transition-colors"
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<span className="text-sm font-medium text-gray-600">{email.sender.name}</span>
|
<span className="text-sm text-gray-600">{email.sender.name}</span>
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-2">
|
||||||
{email.isUnread && (
|
{email.isUnread && (
|
||||||
<span className="w-2 h-2 bg-blue-600 rounded-full"></span>
|
<span className="w-1.5 h-1.5 bg-blue-600 rounded-full"></span>
|
||||||
)}
|
)}
|
||||||
<span className="text-sm text-gray-500">{email.date}</span>
|
<span className="text-sm text-gray-500">{email.date}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -78,22 +78,22 @@ export function News() {
|
|||||||
<RefreshCw className="h-4 w-4" />
|
<RefreshCw className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="p-4">
|
<CardContent className="p-3">
|
||||||
{error ? (
|
{error ? (
|
||||||
<p className="text-center text-red-500">{error}</p>
|
<p className="text-center text-red-500">{error}</p>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-3 max-h-[240px] overflow-y-auto pr-2">
|
<div className="space-y-2 max-h-[220px] overflow-y-auto">
|
||||||
{news.length === 0 ? (
|
{news.length === 0 ? (
|
||||||
<p className="text-center text-gray-500">No news available</p>
|
<p className="text-center text-gray-500">No news available</p>
|
||||||
) : (
|
) : (
|
||||||
news.map((item) => (
|
news.map((item) => (
|
||||||
<div
|
<div
|
||||||
key={item.id}
|
key={item.id}
|
||||||
className="p-3 hover:bg-gray-50/50 rounded-lg transition-colors"
|
className="p-2 hover:bg-gray-50/50 rounded-lg transition-colors"
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<span className="text-sm text-gray-600">{item.date}</span>
|
<span className="text-sm text-gray-500">{item.date}</span>
|
||||||
<span className="text-xs px-2.5 py-1 rounded-full bg-blue-50 text-blue-700">
|
<span className="text-xs px-2 py-0.5 rounded-full bg-blue-50 text-blue-600">
|
||||||
{item.category}
|
{item.category}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user