Skip to content

Instantly share code, notes, and snippets.

View xerudro's full-sized avatar

Romeo Alexandru Neacsu xerudro

  • Neacsu Romeo Alexandru P.F.A
  • Satu Mare, Romania
  • 11:27 (UTC +03:00)
View GitHub Profile
@xerudro
xerudro / Dashboard.tsx
Created March 29, 2025 13:37
Profile.tsx
// 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';
@xerudro
xerudro / SignIn.tsx
Created March 29, 2025 13:15
SignIn.tsx
// 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({
@xerudro
xerudro / Navbar.tsx
Created March 29, 2025 13:02
SuperHosting Navbar
// src/components/Navbar.tsx
import React, { useState, useEffect } from 'react';
import { Menu, X, Globe, LogIn, UserPlus, User, LogOut, Shield } from 'lucide-react';
import { Link, useLocation } from 'react-router-dom';
// Updated import path
import { useAuth } from '../components/AuthContext';
// REMOVED: useRole import
// import { useRole } from '../lib/hooks/useRole';
import { AuthModal } from './AuthModal';