import React from "react";
import { BrowserRouter, Routes, Route} from "react-router-dom";
import Login from "./pages/Login";
import Signup from "./pages/Signup";
import DashboardLayout from "./components/layouts/DashboardLayouts";
import Overview from "./pages/Overview";
import Referrals from "./pages/Referrals";
import Earnings from "./pages/Earnings";
import { Toaster } from "react-hot-toast";
import Landing from "./pages/Landing";

const App: React.FC = () => {
  return (
    <BrowserRouter>
      <Routes>
        
        <Route path="/login" element={<Login />} />
        <Route path="/signup" element={<Signup />} />
        <Route path="/" element={<Landing/>} />

        <Route element={<DashboardLayout />}>
          <Route path="/dashboard/overview" element={<Overview />} />
          <Route path="/dashboard/referrals" element={<Referrals />} />
          <Route path="/dashboard/earnings" element={<Earnings />} />
        </Route>
      </Routes>
      <Toaster position="top-right" reverseOrder={false} />
    </BrowserRouter>
  );
};

export default App;
