make header action button types explicit

This commit is contained in:
2026-09-06 16:54:58 +03:00
parent a9ebaab9ea
commit a4b8b9c593
+11 -11
View File
@@ -106,7 +106,7 @@ export const Header = () => {
<div className="ml-auto flex items-center gap-1 sm:gap-3 shrink-0">
{/* Real Live EKAP Mode Badge */}
<button
<button type="button"
onClick={refreshLiveEKAPData}
disabled={isRefreshingLive}
className="bg-emerald-600 hover:bg-emerald-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs hidden md:hidden md:flex items-center gap-1.5 shadow-xs transition-colors shrink-0 disabled:opacity-50"
@@ -117,7 +117,7 @@ export const Header = () => {
</button>
{/* AI Şartname Analizi */}
<button
<button type="button"
onClick={() => setIsAiSpecAnalyzerOpen(true)}
className="bg-purple-600 hover:bg-purple-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 shadow-xs transition-colors shrink-0"
title="Teknik şartnameyi AI ile analiz edin"
@@ -127,7 +127,7 @@ export const Header = () => {
</button>
{/* Company Web Scanner Button */}
<button
<button type="button"
onClick={() => setIsCompanyScannerOpen(true)}
className="bg-blue-600 hover:bg-blue-500 text-white font-bold px-3 py-1.5 rounded-lg text-xs hidden md:flex items-center gap-1.5 shadow-xs transition-colors shrink-0"
title="Web Sitenizi Tarayın & AI İhale Profiline İşleyin"
@@ -144,7 +144,7 @@ export const Header = () => {
{/* Notifications Dropdown */}
<div className="relative">
<button
<button type="button"
aria-label="Bildirimler"
onClick={() => {setShowNotifications(!showNotifications);if(!showNotifications)void refreshNotifications();}}
className="relative p-2 text-slate-300 hover:text-white hover:bg-slate-700 rounded-lg transition-colors"
@@ -159,9 +159,9 @@ export const Header = () => {
<div className="absolute right-0 mt-2 w-80 bg-white text-slate-800 rounded-xl shadow-xl border border-slate-200 py-2 z-50 animate-fade-in">
<div className="px-4 py-2 border-b border-slate-100 flex items-center justify-between">
<h4 className="font-bold text-sm">Bildirimler</h4>
<button disabled={notificationBusy || !notifications.some(n=>!n.read)} onClick={markNotificationsRead} className="text-xs text-blue-600 hover:underline disabled:opacity-50">Tümünü Okundu İşaretle</button>
<button type="button" disabled={notificationBusy || !notifications.some(n=>!n.read)} onClick={markNotificationsRead} className="text-xs text-blue-600 hover:underline disabled:opacity-50">Tümünü Okundu İşaretle</button>
</div>
{notificationError&&<p role="alert" className="px-3 py-2 text-xs text-red-700">{notificationError} <button className="underline" onClick={refreshNotifications}>Bildirimleri yeniden yükle</button></p>}
{notificationError&&<p role="alert" className="px-3 py-2 text-xs text-red-700">{notificationError} <button type="button" className="underline" onClick={refreshNotifications}>Bildirimleri yeniden yükle</button></p>}
{notificationBusy&&<p role="status" className="px-3 text-xs">Okundu bilgisi kaydediliyor…</p>}
<div className="max-h-64 overflow-y-auto divide-y divide-slate-100">
{notifications.map(n => (
@@ -180,7 +180,7 @@ export const Header = () => {
{/* User Profile */}
<div className="relative">
<button
<button type="button"
aria-label="Hesap menüsü"
onClick={() => setShowUserMenu(!showUserMenu)}
className="bg-slate-700 hover:bg-slate-600 text-white px-3 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-2 transition-colors border border-slate-600"
@@ -206,13 +206,13 @@ export const Header = () => {
<p className="text-xs text-slate-500 truncate">{authUser?.email || userProfile.company}</p>
</div>
<div className="py-1 text-xs">
<button
<button type="button"
onClick={() => { setShowUserMenu(false); setActiveTab('list'); }}
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
>
<User className="w-4 h-4 text-slate-400" /> Firma Bilgileri & Üyeler
</button>
<button
<button type="button"
onClick={() => { setShowUserMenu(false); setActiveTab('planlar'); }}
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
>
@@ -222,7 +222,7 @@ export const Header = () => {
{planAdi}
</span>
</button>
<button
<button type="button"
onClick={() => { setShowUserMenu(false); setActiveTab('pwa_settings'); }}
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
>
@@ -230,7 +230,7 @@ export const Header = () => {
</button>
</div>
<div className="border-t border-slate-100 pt-1 text-xs">
<button
<button type="button"
onClick={handleLogout}
className="w-full text-left px-4 py-2 text-red-600 hover:bg-red-50 flex items-center gap-2"
>