Skip to content

Commit

Permalink
Merge branch 'himanshu' of https://github.com/himanegi/hitch-hike-2.0
Browse files Browse the repository at this point in the history
…into raunak
  • Loading branch information
raunakca077 committed May 5, 2024
2 parents 7b86752 + db3f094 commit 8ae2003
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 37 deletions.
10 changes: 2 additions & 8 deletions frontend/app/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,19 @@ function Header() {
icon: "/ride.svg",
path: "/trips",
},
{
id: 4,
name: "Dijkstra",
icon: "/dijkstra.svg",
path: "/mapsection",
},
];

return (
<div className="pl-10 pr-10 flex items-center justify-between">
<div className="flex gap-20 items-center">
<Link href={"/"}>
<Image src={"/carpool.svg"} height={70} width={70} alt="Logo" />
<Image src={"/map.svg"} height={70} width={70} alt="Logo" />
</Link>
<div className="flex gap-10 items-center">
{headerMenu.map((item) => (
<Link href={item.path} key={item.id}>
<div className={styles.headerItem}>
<Image src={item.icon} height={20} width={20} alt={item.name} />
<Image src={item.icon} height={30} width={30} alt={item.name} />
<h2 className="text-[15px] font-medium ml-1">{item.name}</h2>
</div>
</Link>
Expand Down
12 changes: 0 additions & 12 deletions frontend/app/destinationinput/page.js

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/app/map/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const Map = ({ myPoints, allPaths }) => {
return (
<canvas
ref={canvasRef}
className="h-[630px] bg-white shadow-md rounded-lg transition-all duration-300 hover:ring-2 hover:ring-indigo-500"
className="h-[700px] bg-white shadow-md rounded-lg transition-all duration-300 hover:ring-2 hover:ring-indigo-500"
/>
);
};
Expand Down
10 changes: 6 additions & 4 deletions frontend/app/search/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const SearchComponent = () => {
<div className="bg-gray-100 pt-3 pb-3">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="grid md:grid-cols-4 gap-8">
<div className="overflow-y-scroll h-[630px] md:col-span-2 bg-white shadow-md rounded-lg p-6 transition-all duration-300 hover:ring-2 hover:ring-indigo-500">
<div className="overflow-y-scroll-hidden h-[700px] md:col-span-2 bg-white shadow-md rounded-lg p-6 transition-all duration-300 hover:ring-2 hover:ring-indigo-500">
<style jsx>{`
/* Customize the scrollbar */
::-webkit-scrollbar {
Expand Down Expand Up @@ -190,7 +190,6 @@ const SearchComponent = () => {
onCoordinatesChange={setDestinationCoordinates}
onPlaceChange={setDestinationPlace}
/>
<button onClick={handleClick}>Get Route</button>
{/* <InputItem
type="source"
map={map}
Expand All @@ -211,8 +210,11 @@ const SearchComponent = () => {
destinationCoordinates={destinationCoordinates}
/> */}
<button
className="ripple-bg-indigo-300 inline-flex w-full justify-center mt-10 py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 transition-all duration-300 hover:ring-2 hover:ring-indigo-500"
onClick={fetchAvailableRides}
className="inline-flex w-full justify-center mt-4 py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 transition-all duration-300 hover:ring-2 hover:ring-indigo-500"
onClick={() => {
fetchAvailableRides();
handleClick();
}}
>
Search
</button>
Expand Down
8 changes: 6 additions & 2 deletions frontend/app/share/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ const ShareComponent = () => {
onCoordinatesChange={setDestinationCoordinates}
onPlaceChange={setDestinationPlace}
/>
<button onClick={handleClick}>Get Route</button>
<button
className="mt-4 w-full inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 transition-all duration-300 hover:ring-2 hover:ring-indigo-500"
onClick={handleClick}
>
Get Route
</button>
{/* <InputItem
type="source"
namespace="Source"
Expand Down Expand Up @@ -262,7 +267,6 @@ const ShareComponent = () => {
<div>
<button
type="submit"
data-ripple-light="true"
className="w-full inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 transition-all duration-300 hover:ring-2 hover:ring-indigo-500"
>
Share
Expand Down
14 changes: 11 additions & 3 deletions frontend/app/sourceinput/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ const InputSource = ({

return (
<div>
<label htmlFor="locationSelect">{label}</label>
<br />
<select id="locationSelect" onChange={handleLocationChange}>
<label
htmlFor="locationSelect"
className="block text-sm font-medium text-gray-700 mt-2"
>
{label}
</label>
<select
className="mt-1 block w-full outline-none rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm p-2 transition-all duration-300 focus:outline-none focus:ring-2 hover:ring-2 hover:ring-indigo-500"
id="locationSelect"
onChange={handleLocationChange}
>
<option value="" disabled selected>
Select a location
</option>
Expand Down
9 changes: 9 additions & 0 deletions frontend/public/car.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion frontend/public/magnifier.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions frontend/public/map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions frontend/public/ride.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions frontend/public/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ae2003

Please sign in to comment.