This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/pages/Dashboard.tsx | |
import React from 'react'; | |
import { Routes, Route, Navigate } from 'react-router-dom'; | |
// --- Corrected Import Path --- | |
import { useAuth } from '../components/AuthContext'; | |
// --- Layout and Page Components --- | |
import DashboardLayout from '../components/dashboard/DashboardLayout'; | |
import DashboardOverview from '../components/dashboard/DashboardOverview'; | |
import HostingServices from '../components/dashboard/services/HostingServices'; | |
import DatabaseServices from '../components/dashboard/services/DatabaseServices'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/pages/Login.tsx | |
import React, { useState } from 'react'; | |
import { useNavigate, Link, useLocation } from 'react-router-dom'; // Added useLocation | |
import { Mail, Lock, Loader2, AlertTriangle } from 'lucide-react'; | |
import { useAuth } from '../components/AuthContext'; // Ensure correct path | |
import { z } from 'zod'; | |
import { toast } from 'react-hot-toast'; | |
// Schema Zod pentru validare (similar cu AuthModal) | |
const loginSchema = z.object({ |