Add Settings link to Dashboard header

This commit is contained in:
2026-01-28 17:39:30 +11:00
parent d4608fefbe
commit b214f56570

View File

@@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { useAuth } from '../contexts/AuthContext';
import { choreService, Chore } from '../api/chores';
import ChoreCard from '../components/ChoreCard';
@@ -73,6 +74,17 @@ const Dashboard: React.FC = () => {
<h1 className="text-2xl font-bold text-gray-900">Family Hub</h1>
<p className="text-sm text-gray-600">Welcome back, {user?.full_name}!</p>
</div>
<div className="flex items-center gap-3">
<Link
to="/settings"
className="px-4 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors flex items-center gap-2"
>
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
Settings
</Link>
<button
onClick={logout}
className="px-4 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
@@ -80,6 +92,7 @@ const Dashboard: React.FC = () => {
Sign Out
</button>
</div>
</div>
</header>
{/* Main Content */}