mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 03:00:49 +08:00
feat: initialize new React application structure with TypeScript, ESLint, and Prettier configurations, while removing legacy files and adding new components and pages for enhanced functionality
This commit is contained in:
20
src/components/common/NotificationContainer.tsx
Normal file
20
src/components/common/NotificationContainer.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useNotificationStore } from '@/stores';
|
||||
|
||||
export function NotificationContainer() {
|
||||
const { notifications, removeNotification } = useNotificationStore();
|
||||
|
||||
if (!notifications.length) return null;
|
||||
|
||||
return (
|
||||
<div className="notification-container">
|
||||
{notifications.map((notification) => (
|
||||
<div key={notification.id} className={`notification ${notification.type}`}>
|
||||
<div className="message">{notification.message}</div>
|
||||
<button className="close-btn" onClick={() => removeNotification(notification.id)}>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user