feat: update profile and dashboard components
- Simplified avatar rendering logic in ProfilePage by removing unnecessary eslint-disable comments. - Added primaryTagId and availableTags props to RecentTasks for better task management. - Cleaned up imports in TagDistributionChart by removing unused PieLabelRenderProps. - Removed redundant mobile link class function in HeaderMobile for improved readability.
This commit is contained in:
@@ -194,10 +194,8 @@ export default function ProfilePage() {
|
||||
{profile.avatar && (
|
||||
<div className="absolute -bottom-2 -right-2 w-8 h-8 bg-[var(--success)] rounded-full border-4 border-[var(--card)] flex items-center justify-center">
|
||||
{isGravatarUrl(profile.avatar) ? (
|
||||
/* eslint-disable-next-line jsx-a11y/alt-text */
|
||||
<ExternalLink className="w-4 h-4 text-white" aria-label="Avatar Gravatar" />
|
||||
) : (
|
||||
/* eslint-disable-next-line jsx-a11y/alt-text */
|
||||
<Image className="w-4 h-4 text-white" aria-label="Avatar personnalisé" />
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -80,6 +80,8 @@ export function RecentTasks({ tasks, selectedSources = [], hiddenSources = [] }:
|
||||
key={task.id}
|
||||
variant="detailed"
|
||||
title={task.title}
|
||||
primaryTagId={task.primaryTagId}
|
||||
availableTags={availableTags}
|
||||
description={task.description}
|
||||
status={task.status}
|
||||
priority={task.priority as 'low' | 'medium' | 'high'}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Card } from '@/components/ui/Card';
|
||||
import { PieChart, Pie, Cell, ResponsiveContainer, Tooltip, Legend, BarChart, Bar, XAxis, YAxis, CartesianGrid, PieLabelRenderProps } from 'recharts';
|
||||
import { PieChart, Pie, Cell, ResponsiveContainer, Tooltip, BarChart, Bar, XAxis, YAxis, CartesianGrid, PieLabelRenderProps } from 'recharts';
|
||||
import { TagDistributionMetrics } from '@/services/analytics/tag-analytics';
|
||||
|
||||
interface TagDistributionChartProps {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import { useState } from 'react';
|
||||
import { X, Menu } from 'lucide-react';
|
||||
import { signOut } from 'next-auth/react';
|
||||
import Link from 'next/link';
|
||||
import { HeaderControls } from './HeaderControls';
|
||||
import { HeaderNavigation } from './HeaderNavigation';
|
||||
import { AuthButton } from '@/components/AuthButton';
|
||||
@@ -17,13 +16,7 @@ interface HeaderMobileProps {
|
||||
export function HeaderMobile({ title, subtitle, syncing }: HeaderMobileProps) {
|
||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
||||
|
||||
// Fonction pour obtenir les classes CSS d'un lien (mobile)
|
||||
const getMobileLinkClasses = (href: string) => {
|
||||
const baseClasses = "font-mono text-sm uppercase tracking-wider transition-colors px-4 py-3 rounded-md block w-full text-left";
|
||||
|
||||
// Simplifier pour éviter la duplication de logique
|
||||
return `${baseClasses} text-[var(--muted-foreground)] hover:text-[var(--primary)] hover:bg-[var(--card-hover)]`;
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user