diff --git a/taskncoffee-app/src/App.jsx b/taskncoffee-app/src/App.jsx index 311ed8d..23350e7 100644 --- a/taskncoffee-app/src/App.jsx +++ b/taskncoffee-app/src/App.jsx @@ -1,12 +1,25 @@ import './App.css' import { LoginPage } from './pages/Login' +import { SignUp } from './pages/SignUp' +import { AuthLayout } from './layouts/AuthLayout' +import { Routes, Route, Navigate } from 'react-router' + function App() { return ( - <> - - + + } /> + + + }> + } /> + } /> + + + } /> + ) } diff --git a/taskncoffee-app/src/components/test.jsx b/taskncoffee-app/src/components/test.jsx new file mode 100644 index 0000000..a592533 --- /dev/null +++ b/taskncoffee-app/src/components/test.jsx @@ -0,0 +1,46 @@ +"use client" + +import React, { useState } from "react" +import { motion, AnimatePresence } from "motion/react" + +export default function RippleButton({ children }) { + const [ripples, setRipples] = useState([]) + + const addRipple = (e) => { + const rect = e.currentTarget.getBoundingClientRect() + const x = e.clientX - rect.left + const y = e.clientY - rect.top + const id = Date.now() + + setRipples([...ripples, { x, y, id }]) + + setTimeout(() => { + setRipples((r) => r.filter((ripple) => ripple.id !== id)) + }, 600) // ripple длится ~600ms + } + + return ( + + ) +} diff --git a/taskncoffee-app/src/layouts/AuthLayout.jsx b/taskncoffee-app/src/layouts/AuthLayout.jsx index e69de29..19b1119 100644 --- a/taskncoffee-app/src/layouts/AuthLayout.jsx +++ b/taskncoffee-app/src/layouts/AuthLayout.jsx @@ -0,0 +1,13 @@ +import { Outlet } from 'react-router' + +const AuthLayout = ({ className }) => { + return ( +
+
+ +
+
+ ) +} + +export { AuthLayout } \ No newline at end of file diff --git a/taskncoffee-app/src/main.jsx b/taskncoffee-app/src/main.jsx index b9a1a6d..560babb 100644 --- a/taskncoffee-app/src/main.jsx +++ b/taskncoffee-app/src/main.jsx @@ -2,9 +2,12 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import './index.css' import App from './App.jsx' +import { BrowserRouter } from 'react-router' createRoot(document.getElementById('root')).render( - + + + , ) diff --git a/taskncoffee-app/src/pages/Login.jsx b/taskncoffee-app/src/pages/Login.jsx index fb9149a..d894351 100644 --- a/taskncoffee-app/src/pages/Login.jsx +++ b/taskncoffee-app/src/pages/Login.jsx @@ -12,6 +12,7 @@ import { import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { login } from "@/apiv1/auth.service" +import { Link } from "react-router" export function LoginPage({ className }) { @@ -49,7 +50,9 @@ export function LoginPage({ className }) { Enter your username below to login to your account - + diff --git a/taskncoffee-app/src/pages/SignUp.jsx b/taskncoffee-app/src/pages/SignUp.jsx index 6d38b71..3652a92 100644 --- a/taskncoffee-app/src/pages/SignUp.jsx +++ b/taskncoffee-app/src/pages/SignUp.jsx @@ -1,7 +1,8 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; +import { Link } from "react-router" -const Signup1 = ({ +const SignUp = ({ heading = "Signup", logo = { url: "https://www.shadcnblocks.com", @@ -56,7 +57,7 @@ const Signup1 = ({ href={signupUrl} className="text-primary font-medium hover:underline" > - Login + Login @@ -65,4 +66,4 @@ const Signup1 = ({ ); }; -export { Signup1 }; +export { SignUp };