Refactor AuthContext into smaller files
Refactors the AuthContext.tsx file into smaller, more manageable files to improve code organization and maintainability. The functionality remains the same.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Bell } from 'lucide-react';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { useAuth } from '@/contexts/auth';
|
||||
|
||||
const Header: React.FC = () => {
|
||||
const { user } = useAuth();
|
||||
|
||||
@@ -4,8 +4,8 @@ import { Switch } from "@/components/ui/switch";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { CloudUpload, RefreshCw } from "lucide-react";
|
||||
import { isSyncEnabled, setSyncEnabled, syncAllData, getLastSyncTime } from "@/utils/syncUtils";
|
||||
import { toast } from "@/components/ui/use-toast";
|
||||
import { useAuth } from "@/contexts/AuthContext";
|
||||
import { toast } from "@/hooks/useToast.wrapper";
|
||||
import { useAuth } from "@/contexts/auth";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user