Apply UI updates: tags gap, notifications, card click, breadcrumb, move share input
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
22
src/components/NotificationCenter.tsx
Normal file
22
src/components/NotificationCenter.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from 'react'
|
||||
import useAppStore from '../store/useAppStore'
|
||||
|
||||
const NotificationCenter: React.FC = () => {
|
||||
const notifications = useAppStore((s) => s.notifications)
|
||||
const removeNotification = useAppStore((s) => s.removeNotification)
|
||||
|
||||
if (!notifications || notifications.length === 0) return null
|
||||
|
||||
return (
|
||||
<div className="notif-container">
|
||||
{notifications.map((n) => (
|
||||
<div key={n.id} className={`notif ${n.type ?? ''}`}>
|
||||
<div>{n.message}</div>
|
||||
<button onClick={() => removeNotification(n.id)}>×</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default NotificationCenter
|
||||
Reference in New Issue
Block a user