diff --git a/src/app/(main)/funds_transfer/add_beneficary/page.tsx b/src/app/(main)/funds_transfer/add_beneficary/page.tsx
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/(main)/funds_transfer/layout.tsx b/src/app/(main)/funds_transfer/layout.tsx
index dcc186c..0ab1188 100644
--- a/src/app/(main)/funds_transfer/layout.tsx
+++ b/src/app/(main)/funds_transfer/layout.tsx
@@ -1,71 +1,74 @@
"use client";
-import { Button, Group } from '@mantine/core';
-import { IconHome } from '@tabler/icons-react';
+import { Divider, Stack, Text } from '@mantine/core';
+import { usePathname } from 'next/navigation';
import Link from 'next/link';
-import React from 'react';
+import React, { useEffect, useState } from 'react';
+import { useRouter } from "next/navigation";
export default function Layout({ children }: { children: React.ReactNode }) {
- return (
-
-
-
Menu
+ const [authorized, SetAuthorized] = useState
(null);
+ const router = useRouter();
+ const pathname = usePathname();
-
- }
- variant="light"
- color="blue"
- fullWidth
- >
- Quick Pay
-
-
+ const links = [
+ { label: " Quick Pay", href: "/funds_transfer" },
+ { label: "Send to Beneficiary", href: "/accounts/account_statement" },
+ { label: "Transfer within the bank", href: "/accounts/account_statement" },
+ { label: "Add Beneficary", href: "/accounts/account_statement" },
+ { label: "View Beneficary ", href: "/accounts/account_statement" },
+ ];
+ useEffect(() => {
+ const token = localStorage.getItem("access_token");
+ if (!token) {
+ SetAuthorized(false);
+ router.push("/login");
+ }
+ else {
+ SetAuthorized(true);
+ }
+ }, []);
-
- }
- variant="light"
- color="blue"
- fullWidth
- >
- Send to Beneficiary
-
-
+ if (authorized) {
+ return (
+
+
+
+
+ Send Money
+
+
-
- }
- variant="light"
- color="blue"
- fullWidth
- >
- Transfer within the bank
-
-
+
+ {links.map(link => {
+ const isActive = pathname === link.href;
+ return (
+
+ {link.label}
+
+ );
+ })}
+
+
+
+
+ {children}
+
-
- {/* Main content */}
-
- {children}
-
-
- );
+ );
+ }
}