-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
487d2e8
commit 5e65f1d
Showing
17 changed files
with
459 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,38 @@ | ||
import { RouterProvider, createBrowserRouter } from "react-router-dom"; | ||
import Login from "./pages/Login"; | ||
import LandingPage from "./pages/LandingPage"; | ||
import Register from './pages/Register'; | ||
import Success from './components/register/Success'; | ||
import RegisterSection from './components/register/RegisterSection'; | ||
import { RouterProvider, createBrowserRouter } from 'react-router-dom'; | ||
import Login from './pages/Login'; | ||
import LandingPage from './pages/LandingPage'; | ||
|
||
const App = () => { | ||
const router = createBrowserRouter([ | ||
{ | ||
path: "/", | ||
path: '/', | ||
children: [ | ||
{ | ||
index: true, | ||
element: <LandingPage /> | ||
element: <LandingPage />, | ||
}, | ||
{ | ||
path: "login", | ||
element: <Login /> | ||
} | ||
] | ||
path: 'login', | ||
element: <Login />, | ||
}, | ||
], | ||
}, | ||
{ | ||
path: 'register', | ||
element: <Register />, | ||
children: [ | ||
{ | ||
path: '/register', | ||
element: <RegisterSection />, | ||
}, | ||
{ path: 'success', element: <Success /> }, | ||
], | ||
}, | ||
]) | ||
return ( | ||
<RouterProvider router={router} /> | ||
); | ||
]); | ||
return <RouterProvider router={router} />; | ||
}; | ||
|
||
export default App; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { cn } from "../utils"; | ||
|
||
interface ButtonProps { | ||
text: string; | ||
buttonId?: string; | ||
type?: 'submit' | 'reset' | 'button'; | ||
className?: string; | ||
onClick?: () => void; | ||
} | ||
const Button = ({ text, type, className, onClick }: ButtonProps) => { | ||
return ( | ||
<button | ||
type={type} | ||
className={cn('p-2 rounded-lg bg-greenColor hover:bg-darkGreen transition-all text-whiteColor font-bold', className)} | ||
onClick={onClick} | ||
> | ||
{text} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { forwardRef } from 'react'; | ||
import { cn } from '../utils'; | ||
|
||
interface InputProps { | ||
type: string; | ||
label: string; | ||
id: string; | ||
placeholder: string; | ||
error?: string; | ||
labelClassName?: string; | ||
inputClasname?: string; | ||
} | ||
|
||
// Use React.forwardRef to forward the ref to the input element | ||
const Input = forwardRef<HTMLInputElement, InputProps>( | ||
({ type, labelClassName, inputClasname, label, id, placeholder, error = '', ...rest }, ref) => { | ||
return ( | ||
<label className={cn('flex flex-col gap-1 font-lg font-medium flex-1 w', labelClassName)}> | ||
{label} | ||
<input | ||
type={type} | ||
id={id} | ||
placeholder={placeholder} | ||
className={cn('p-1 px-3 rounded-lg border border-blackColor outline-none font-normal', inputClasname)} | ||
ref={ref} | ||
{...rest} | ||
/> | ||
{error && <p className='text-redColor text-xs'>{error}</p>} | ||
</label> | ||
); | ||
} | ||
); | ||
|
||
export default Input; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { forwardRef } from 'react'; | ||
|
||
interface SelectProps { | ||
placeholder: string; | ||
error?: string; | ||
options: string[]; | ||
} | ||
const Select = forwardRef<HTMLSelectElement, SelectProps>(({ placeholder, options,error,...rest }, ref) => { | ||
return ( | ||
<> | ||
<select ref={ref} name='role' id='role' className='p-2 outline-0 border border-blackColor flex-1 rounded-lg' {...rest}> | ||
<option value=''>{placeholder}</option> | ||
{options.map((option, index) => ( | ||
<option key={index} value={option}> | ||
{option[0].toUpperCase() + option.slice(1)} | ||
</option> | ||
))} | ||
</select> | ||
<p className='text-redColor text-xs -mt-3'>{error}</p> | ||
</> | ||
); | ||
}); | ||
|
||
export default Select; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { RiCloseLargeFill } from '@remixicon/react'; | ||
import { useState } from 'react'; | ||
|
||
const InfoTip = () => { | ||
const [InfoTipClosed, setInfoTipClosed] = useState(false); | ||
|
||
const handleInfoTipClosing = () => { | ||
setInfoTipClosed(true); | ||
}; | ||
return ( | ||
<div className={`bg-blackColor w-full text-whiteColor mt-4 px-4 xl:px-0 ${InfoTipClosed ? 'h-0 hidden opacity-0 transition-all' : 'block'}`}> | ||
<div className='flex flex-row justify-between items-center xl:container w-full py-2 mx-auto'> | ||
<p className='w-8/12 text-lg'> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid eum accusantium reiciendis Lorem ipsum dolor | ||
sit amet | ||
</p> | ||
<RiCloseLargeFill | ||
size={24} | ||
className='rounded-full p-2 border w-10 h-10 aspect-square' | ||
onClick={handleInfoTipClosing} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default InfoTip; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { RiMenu2Fill, RiPhoneLine, RiQuestionFill, RiSearch2Line } from '@remixicon/react'; | ||
|
||
const Navbar = () => { | ||
return ( | ||
<div className='flex flex-row items-center justify-between w-full px-4 xl:px-0 xl:container mt-4 '> | ||
<a href='/' className='w-2/12 uppercase font-extrabold text-sm md:text-xl xl:text-3xl flex'> | ||
Mavericks <span>🏀</span> | ||
</a> | ||
|
||
<span className='hidden sm:flex flex-row items-center px-3 border border-blackColor rounded-full sm:w-7/12 md:w-4/12'> | ||
<input type='text' name='' id='' className='outline-0 p-1 text-md w-full outline-none' /> | ||
<RiSearch2Line size={24} className=' grid place-content-center' /> | ||
</span> | ||
<RiMenu2Fill className='sm:block md:hidden' /> | ||
<div className='w-3/12 md:flex flex-row justify-end gap-3 hidden'> | ||
<span className='flex flex-row items-center justify-center gap-1'> | ||
<RiPhoneLine /> | ||
+250 787 922 900 | ||
</span> | ||
<span className='flex flex-row items-center justify-center gap-1'> | ||
<RiQuestionFill /> | ||
Help | ||
</span> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Navbar; |
Oops, something went wrong.