-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My branch #23
Merged
Merged
My branch #23
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f4353a5
pushed
UmeshPaliyaal a64eca9
LoginForm
UmeshPaliyaal 076c1f1
defrgf
UmeshPaliyaal 0bd427a
Quote , login , register pages added
UmeshPaliyaal 6bbad39
Login with google function added
UmeshPaliyaal 3d2081e
Update in registration page
UmeshPaliyaal 0f69eab
Update Register.tsx
UmeshPaliyaal 6455d59
deleted Compnants
UmeshPaliyaal fa61d6c
images path changed
UmeshPaliyaal 9a62481
all sorted
UmeshPaliyaal b220f45
deleted Quote.tsx
UmeshPaliyaal b11b635
Merge branch 'main' into myBranch
UmeshPaliyaal bb6b14f
my branch mereger
UmeshPaliyaal 81e68a5
quote update
UmeshPaliyaal 37c8893
css files deleted and tailwind applied
UmeshPaliyaal 91f688f
format adjusted
UmeshPaliyaal 15ab970
Librarylist page added
UmeshPaliyaal 844dd08
major changes
UmeshPaliyaal 361472c
Merge branch 'main' into myBranch
UmeshPaliyaal f69a8a7
..
UmeshPaliyaal 67b443c
Saperate component Modale added alongwith minor css changes
UmeshPaliyaal 15e0593
Update package.json
UmeshPaliyaal 42965bc
Update package.json
UmeshPaliyaal 21f272d
package.json changes
UmeshPaliyaal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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,28 @@ | ||
import { BrowserRouter, Route, Routes } from "react-router-dom"; | ||
import LandingPage from "./Pages/LandingPage"; | ||
import NotFound from "./NotFound"; | ||
|
||
import './App.css' | ||
import LoginForm from './Pages/LoginForm/LoginForm'; | ||
import Register from './Pages/register/Register'; | ||
import LandingPage from './Pages/LandingPage' | ||
import { BrowserRouter, Routes, Route } from 'react-router-dom'; | ||
import Librarylist from './Pages/Librarylist'; | ||
import Users from './Pages/Users'; | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<BrowserRouter> | ||
<Routes> | ||
<Route path="*" element={<NotFound />} /> | ||
<Route path="LibraryManagement" element={<LandingPage />} /> | ||
<Route | ||
path="LibraryManagement/management/login" | ||
element={<LandingPage />} | ||
/> | ||
<Route | ||
path="LibraryManagement/user/login" | ||
element={<LandingPage />} | ||
/> | ||
</Routes> | ||
</BrowserRouter> | ||
</> | ||
); | ||
<BrowserRouter basename="/LibraryManagement"> | ||
<Routes> | ||
<Route path="/" element={<LandingPage />} /> | ||
<Route path="/library/login" element={<LoginForm up='library'/>} /> | ||
<Route path="/user/login" element={<LoginForm up='user'/>} /> | ||
<Route path='/register' element={<Register/>}/> | ||
<Route path='/librarylist' element={<Librarylist/>}/> | ||
<Route path='/users' element={<Users/>}/> | ||
|
||
|
||
|
||
</Routes> | ||
</BrowserRouter> | ||
) | ||
} | ||
|
||
export default App; |
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { useState } from "react"; | ||
import { Input } from "@/components/ui/input"; | ||
import { Button } from "@/components/ui/button"; | ||
import Nav from "@/mycomponents/Nav"; | ||
import Modal from "@/mycomponents/Modal"; | ||
|
||
function Librarylist() { | ||
const [isModalOpen, setIsModalOpen] = useState(false); | ||
const [isSecondModalOpen, setIsSecondModalOpen] = useState(false); | ||
|
||
const [selectLibrary, setSelectLibrary] = useState<Library | null>(null); | ||
|
||
interface Library { | ||
yogeshpaliyal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
id: number; | ||
name: string; | ||
description: string; | ||
image: string; | ||
} | ||
|
||
const libraries: Library[] = [ | ||
{ | ||
id: 1, | ||
name: "library 1", | ||
description: "hbn", | ||
image: "./images/book.jpg", | ||
}, | ||
{ | ||
id: 2, | ||
name: "library 2", | ||
description: "good library", | ||
image: "./images/book.jpg", | ||
}, | ||
{ | ||
id: 3, | ||
name: "library 3", | ||
description: "wifi available", | ||
image: "./images/book.jpg", | ||
}, | ||
]; | ||
|
||
const openModal = (library: Library) => { | ||
setSelectLibrary(library); | ||
setIsModalOpen(true); | ||
}; | ||
|
||
const openSecondModal = () => { | ||
setIsModalOpen(false); | ||
setIsSecondModalOpen(true); | ||
}; | ||
const closeSecondModal = () => { | ||
setIsSecondModalOpen(false); | ||
}; | ||
|
||
return ( | ||
<div> | ||
|
||
<div className="flex items-center justify-center h-full "> | ||
<div className="flex flex-col w-11/12 gap-8"> | ||
<div> | ||
<Nav /> | ||
<h1 className="text-[48px] ml-4 mt-3 font-bold"> | ||
List of Libraries | ||
</h1> | ||
<p className=" text-[18px] text-gray-400 ml-4"> | ||
Search for your suitable library | ||
</p> | ||
</div> | ||
<Input className="mt-2" placeholder="Search Library"></Input> | ||
{/* library lists */} | ||
{libraries.map((library) => ( | ||
<div | ||
key={library.id} | ||
className="flex flex-row h-36 w-full border border-neutral-300 rounded-r-2xl rounded-l-2xl" | ||
> | ||
<div className="h-28 w-28 mx-4 my-4 "> | ||
<img src={library.image} alt="" /> | ||
</div> | ||
<div className="space-y-2"> | ||
<h1 className="text-[28px] font-bold space-x-3"> | ||
{library.name} | ||
</h1> | ||
<p id="description" className="text-gray-400 "> | ||
library having Ac, Wifi etc. | ||
</p> | ||
<Button onClick={() => openModal(library)}>Book Now</Button> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
{isModalOpen && selectLibrary && ( | ||
<Modal user="first" library={selectLibrary.name} onProceed={openSecondModal} onClose={closeSecondModal}/> | ||
)} | ||
{isSecondModalOpen && selectLibrary && ( | ||
<Modal user="second" library={selectLibrary.name} onProceed={openSecondModal} onClose = { closeSecondModal}/> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default Librarylist; |
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,111 @@ | ||
import { FaUser, FaLock } from "react-icons/fa"; | ||
import { Input } from "@/components/ui/input"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Checkbox } from "@/components/ui/checkbox"; | ||
import { Link } from "react-router-dom"; | ||
import Quote from "@/mycomponents/Quote"; | ||
import { twMerge } from "tailwind-merge"; | ||
import { useNavigate } from "react-router-dom"; | ||
import libraryimage from "./images/library.jpg"; | ||
import googleimage from "./images/Google.jpg"; | ||
interface LoginFormProps { | ||
up: string; | ||
} | ||
|
||
const LoginForm: React.FC<LoginFormProps> = (props) => { | ||
const navigate = useNavigate(); | ||
|
||
const goList = () => { | ||
if (props.up == "user") { | ||
navigate("/librarylist"); | ||
} else { | ||
navigate("/users"); | ||
} | ||
}; | ||
return ( | ||
<div | ||
className={twMerge("flex flex-col md:flex-row h-screen overflow-hidden")} | ||
> | ||
<div className={twMerge("md:w-1/2 relative")}> | ||
<img | ||
className={twMerge("h-full w-full object-cover")} | ||
src={libraryimage} | ||
alt="" | ||
/> | ||
<div className="absolute inset-0 bg-black bg-opacity-70 flex items-center justify-center text-white text-center"> | ||
<Quote /> | ||
</div> | ||
</div> | ||
|
||
<div className="md:w-1/2 flex items-center justify-center"> | ||
<form | ||
onSubmit={goList} | ||
className={twMerge( | ||
"border border-gray-300 w-full md:w-3/5 h-7/10 p-6 rounded" | ||
)} | ||
> | ||
<h1 className={twMerge("text-2xl text-center mb-6")}>Log In</h1> | ||
<div className={twMerge("flex flex-col gap-6")}> | ||
<div className={twMerge("relative")}> | ||
<Input type="email" placeholder="Email" /> | ||
<FaUser | ||
className={twMerge( | ||
"absolute right-3 top-1/2 transform -translate-y-1/2" | ||
)} | ||
/> | ||
</div> | ||
<div className={twMerge("relative")}> | ||
<Input type="password" placeholder="Password" /> | ||
<FaLock | ||
className={twMerge( | ||
"absolute right-3 top-1/2 transform -translate-y-1/2" | ||
)} | ||
/> | ||
</div> | ||
</div> | ||
<div className={twMerge("flex items-center gap-14 mt-4")}> | ||
<label> | ||
<Checkbox className="ml-5" /> Remember me | ||
</label> | ||
<Link className={twMerge("text-blue-700")} to="/"> | ||
Forgot password? | ||
</Link> | ||
</div> | ||
<Button type="submit" className={twMerge("w-full mt-6")}> | ||
Login | ||
</Button> | ||
<p | ||
className={twMerge( | ||
'mt-6 text-center relative flex items-center my-4 before:content-[""] before:flex-1 before:border-b before:border-black before:mx-3 after:content-[""] after:flex-1 after:border-b after:border-black after:mx-3' | ||
)} | ||
> | ||
Or Login with | ||
</p> | ||
<div className={twMerge("flex justify-center gap-4 mt-2")}> | ||
<Button | ||
variant="outline" | ||
className={twMerge("flex items-center gap-1")} | ||
> | ||
<img | ||
className={twMerge("h-3 w-3")} | ||
src={googleimage} | ||
alt="Google" | ||
/> | ||
</Button> | ||
</div> | ||
<div className={twMerge("text-center mt-4")}> | ||
<p> | ||
Want to register?{" "} | ||
<Link className={twMerge("text-blue-700")} to="/register"> | ||
Register | ||
</Link> | ||
</p> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LoginForm; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted