diff --git a/app/courrier/debug-tool.tsx b/app/courrier/debug-tool.tsx
deleted file mode 100644
index ac5ca548..00000000
--- a/app/courrier/debug-tool.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-'use client';
-
-import { EmailDebug } from '../components/debug/EmailDebug';
-import { useEffect, useState } from 'react';
-import { toast } from '@/components/ui/use-toast';
-import { Button } from '@/components/ui/button';
-import { AlertTriangle } from 'lucide-react';
-
-export default function EmailDebugTool() {
- const [isVisible, setIsVisible] = useState(false);
-
- useEffect(() => {
- // Check if we have any accounts-related issue by looking for accounts div in the DOM
- const checkAccounts = () => {
- const accountsElements = document.querySelectorAll('.accounts-dropdown');
- const foldersElements = document.querySelectorAll('.folder-item');
-
- if (accountsElements.length === 0 || foldersElements.length === 0) {
- console.log('No accounts or folders found in DOM, showing quick fix button');
- setIsVisible(true);
- } else {
- setIsVisible(false);
- }
- };
-
- // Check after a delay to allow the UI to render
- const timer = setTimeout(checkAccounts, 3000);
- return () => clearTimeout(timer);
- }, []);
-
- const handleQuickFix = async () => {
- try {
- // Force reload the page with a special param to trigger the fix
- window.location.href = '/courrier?fix=folders&t=' + Date.now();
- } catch (error) {
- console.error('Error applying quick fix:', error);
- }
- };
-
- if (process.env.NODE_ENV === 'production') {
- return null;
- }
-
- // Show the quick fix button if necessary
- if (isVisible) {
- return (
-
-
-
- );
- }
-
- return ;
-}
\ No newline at end of file
diff --git a/app/courrier/loading-fix.tsx b/app/courrier/loading-fix.tsx
deleted file mode 100644
index 50141411..00000000
--- a/app/courrier/loading-fix.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * This is a debugging component that provides troubleshooting tools
- * for the email loading process in the Courrier application.
- *
- * NOTE: This component should only be used during development for debugging purposes.
- * It's kept in the codebase for future reference but won't render in production.
- */
-'use client';
-
-import { Button } from '@/components/ui/button';
-import { RefreshCw, AlertCircle, CheckCircle } from 'lucide-react';
-
-interface LoadingFixProps {
- loading: boolean;
- isLoadingInitial: boolean;
- setLoading: (value: boolean) => void;
- setIsLoadingInitial: (value: boolean) => void;
- setEmails: (emails: any[]) => void;
- loadEmails: () => void;
- emails: any[];
-}
-
-export function LoadingFix({
- loading,
- isLoadingInitial,
- setLoading,
- setIsLoadingInitial,
- setEmails,
- loadEmails,
- emails
-}: LoadingFixProps) {
- // Don't render anything in production mode
- if (process.env.NODE_ENV === 'production') {
- return null;
- }
-
- const forceResetLoadingStates = () => {
- console.log('[DEBUG] Force resetting loading states to false');
- // Force both loading states to false
- setLoading(false);
- setIsLoadingInitial(false);
- };
-
- const forceTriggerLoad = () => {
- console.log('[DEBUG] Force triggering a new email load');
- setLoading(true);
- setTimeout(() => {
- loadEmails();
- }, 100);
- };
-
- const resetEmailState = () => {
- console.log('[DEBUG] Resetting email state to empty array');
- setEmails([]);
- setTimeout(() => {
- forceTriggerLoad();
- }, 100);
- };
-
- return (
-
-
Debug Tools
-
-
-
Loading State:
- {loading ? (
-
- Active
-
- ) : (
-
- Inactive
-
- )}
-
-
-
Initial Loading:
- {isLoadingInitial ? (
-
- Active
-
- ) : (
-
- Inactive
-
- )}
-
-
- Emails Loaded:
- 0 ? "text-green-500" : "text-red-500"}>
- {emails.length}
-
-
-
-
-
-
-
- );
-}
\ No newline at end of file