diff --git a/app/mail/page.tsx b/app/mail/page.tsx
index 1fef5ed6..6f833171 100644
--- a/app/mail/page.tsx
+++ b/app/mail/page.tsx
@@ -527,8 +527,8 @@ export default function MailPage() {
if (!response.ok) {
// No credentials found, redirect to login
router.push("/mail/login");
- return;
- }
+ return;
+ }
// We have credentials, fetch mails
fetchMails();
} catch (err) {
@@ -540,18 +540,54 @@ export default function MailPage() {
checkCredentials();
}, [router, fetchMails]);
+ const handleRefresh = () => {
+ fetchMails();
+ };
+
+ const handleCompose = () => {
+ // TODO: Implement compose functionality
+ console.log('Compose clicked');
+ };
+
+ const handleSearch = (query: string) => {
+ // TODO: Implement search functionality
+ console.log('Search:', query);
+ };
+
+ const handleMailClick = (mail: any) => {
+ // TODO: Implement mail view functionality
+ console.log('Mail clicked:', mail);
+ };
+
if (isLoading) {
- return
Loading...
;
+ return (
+
+ );
}
if (error) {
- return Error: {error}
;
+ return (
+
+ );
}
return (
-
-
-
-
+
);
}
\ No newline at end of file
diff --git a/components/mail/mail-toolbar.tsx b/components/mail/mail-toolbar.tsx
index 96048531..bfc0e225 100644
--- a/components/mail/mail-toolbar.tsx
+++ b/components/mail/mail-toolbar.tsx
@@ -1,34 +1,34 @@
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { Search, RefreshCw, Plus } from 'lucide-react';
+import { Search } from "lucide-react";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
interface MailToolbarProps {
- onCompose?: () => void;
- onRefresh?: () => void;
- onSearch?: (query: string) => void;
+ onRefresh: () => void;
+ onCompose: () => void;
+ onSearch: (query: string) => void;
}
-export const MailToolbar = ({ onCompose, onRefresh, onSearch }: MailToolbarProps) => {
+export function MailToolbar({ onRefresh, onCompose, onSearch }: MailToolbarProps) {
return (
-
-