feat: Initialize FrontendV2 project with React, Vite, and Tailwind CSS

- Add package.json with dependencies and scripts for development and build
- Include Vite logo and React logo SVGs in public/assets
- Set up Tailwind CSS in App.css and index.css
- Create main App component with routing for Home and Login pages
- Implement LoginPage with authentication logic and error handling
- Add HomePage component as a landing page
- Create MyAlert component for displaying alerts using Chakra UI
- Implement color mode toggle functionality with Chakra UI
- Set up global state management using Jotai for authentication
- Create ProtectedRoutes component to guard routes based on authentication
- Add utility components for Toaster and Tooltip using Chakra UI
- Configure Tailwind CSS and TypeScript settings for the project
- Implement AddLoan component for selecting loan periods and fetching available items
This commit is contained in:
2025-10-24 20:21:32 +02:00
parent 86af1a5edf
commit b99f52f09a
34 changed files with 6927 additions and 20 deletions

View File

@@ -1,9 +1,7 @@
import "./App.css";
import Layout from "./layout/Layout";
import { useEffect, useState } from "react";
import Form1 from "./components/Form1";
import Form2 from "./components/Form2";
import Form4 from "./components/Form4";
import { AddLoan } from "./components/AddLoan";
import LoginForm from "./components/LoginForm";
import Cookies from "js-cookie";
import {
@@ -46,13 +44,7 @@ function App() {
return isLoggedIn ? (
<Layout onLogout={handleLogout}>
<div className="space-y-6">
<Form1 />
<div className="h-px bg-slate-200" />
<Form2 />
<div className="h-px bg-slate-200" />
<Form4 />
</div>
<AddLoan />
</Layout>
) : (
<LoginForm onLogin={() => setIsLoggedIn(true)} />