diff --git a/src/components/shared/CustomSnackbar.tsx b/src/components/shared/CustomSnackbar.tsx
index 800aea6..1bef586 100644
--- a/src/components/shared/CustomSnackbar.tsx
+++ b/src/components/shared/CustomSnackbar.tsx
@@ -1,5 +1,4 @@
-import { Snackbar, Alert } from '@mui/material';
-
+import { Snackbar, Alert, AlertTitle, Link, Box } from '@mui/material';
import useSnackbarStore from '../../store/useSnackbarStore';
/**
@@ -16,18 +15,31 @@ export const CustomSnackbar = (): JSX.Element => {
anchorOrigin={
options?.position || { vertical: 'bottom', horizontal: 'right' }
}
- autoHideDuration={options?.duration}
+ autoHideDuration={options?.duration ?? 3000}
open={open}
onClose={closeSnackbar}
>
- {message}
+
+
+ {message}
+ {options?.linkText && options?.linkUrl && (
+
+ {options.linkText}
+
+ )}
+
+
);
};
+
+export default CustomSnackbar;
diff --git a/src/pages/Dashboard/Dashboard.spec.tsx b/src/pages/Dashboard/Dashboard.spec.tsx
deleted file mode 100644
index 120b5b3..0000000
--- a/src/pages/Dashboard/Dashboard.spec.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { render, screen } from '@testing-library/react';
-import { Dashboard } from './Dashboard';
-
-test('renders Dashboard text', () => {
- render();
- const dashboardElement = screen.getByText(/Dashboard/i);
- expect(dashboardElement).toBeInTheDocument();
-});
diff --git a/src/pages/Dashboard/Dashboard.tsx b/src/pages/Dashboard/Dashboard.tsx
deleted file mode 100644
index 6bd3d90..0000000
--- a/src/pages/Dashboard/Dashboard.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export function Dashboard() {
- return
Dashboard
;
-}
diff --git a/src/pages/Dashboard/index.ts b/src/pages/Dashboard/index.ts
deleted file mode 100644
index 6b95d8c..0000000
--- a/src/pages/Dashboard/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { Dashboard } from "./Dashboard";
-
-export default Dashboard;
diff --git a/src/store/useSnackbarStore.ts b/src/store/useSnackbarStore.ts
index 5fd469b..5815113 100644
--- a/src/store/useSnackbarStore.ts
+++ b/src/store/useSnackbarStore.ts
@@ -13,6 +13,9 @@ interface SnackbarOptions {
severity?: 'success' | 'error' | 'warning' | 'info';
duration?: number;
position?: SnackbarOrigin;
+ icon?: React.ReactNode;
+ linkText?: string;
+ linkUrl?: string;
}
const useSnackbarStore = create((set) => ({