Skip to content

Commit

Permalink
fix diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
ajroberts0417 committed Aug 23, 2024
2 parents 25c0d40 + 7350513 commit ff126cf
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 31 deletions.
12 changes: 6 additions & 6 deletions frontend/src/components/compound/Modal/SpaceListingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const SpaceListingModal: React.FC<SpaceListingModalProps> = ({
className="fixed inset-0 bg-white bg-opacity-85 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in"
/>
<div className="fixed inset-0 z-10 w-screen overflow-y-auto ">
<div className="flex items-end justify-center p-4 text-center sm:items-center sm:p-0 h-screen">
<div className="flex items-center justify-center p-4 text-center sm:items-center sm:p-0 h-screen">
<DialogPanel
transition
className="h-4/6 relative transform overflow-y-auto rounded-lg bg-white text-left shadow-xl transition-all data-[closed]:translate-y-4 data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in sm:my-8 sm:w-full sm:max-w-lg data-[closed]:sm:translate-y-0 data-[closed]:sm:scale-95 p-8 border border-gray-200"
Expand Down Expand Up @@ -186,7 +186,7 @@ const SpaceListingModal: React.FC<SpaceListingModalProps> = ({
<section>
<span>Room price</span>
<div className="mb-4 flex flex-col gap-2 mt-2">
<label>
<label className="flex items-center gap-2">
<input
type="radio"
name="priceRange"
Expand All @@ -196,7 +196,7 @@ const SpaceListingModal: React.FC<SpaceListingModalProps> = ({
/>
{RoomPrice.LessThan1500}
</label>
<label className="">
<label className="flex items-center gap-2">
<input
type="radio"
name="priceRange"
Expand All @@ -206,7 +206,7 @@ const SpaceListingModal: React.FC<SpaceListingModalProps> = ({
/>
{RoomPrice.Between1500And1999}
</label>
<label className="">
<label className="flex items-center gap-2">
<input
type="radio"
name="priceRange"
Expand All @@ -216,7 +216,7 @@ const SpaceListingModal: React.FC<SpaceListingModalProps> = ({
/>
{RoomPrice.Between2000And2499}
</label>
<label className="">
<label className="flex items-center gap-2">
<input
type="radio"
name="priceRange"
Expand All @@ -226,7 +226,7 @@ const SpaceListingModal: React.FC<SpaceListingModalProps> = ({
/>
{RoomPrice.Between2500And3000}
</label>
<label className="">
<label className="flex items-center gap-2">
<input
type="radio"
name="priceRange"
Expand Down
43 changes: 26 additions & 17 deletions frontend/src/components/compound/Modal/UserListingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
className="fixed inset-0 bg-white bg-opacity-85 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in"
/>
<div className="fixed inset-0 z-10 w-screen overflow-y-auto ">
<div className="flex items-end justify-center p-4 text-center sm:items-center sm:p-0 h-screen">
<div className="flex items-center justify-center p-4 text-center sm:items-center sm:p-0 h-screen">
<DialogPanel
transition
className="border border-gray-200 h-4/6 relative transform overflow-y-auto rounded-lg bg-white text-left shadow-xl transition-all data-[closed]:translate-y-4 data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in sm:my-8 sm:w-full sm:max-w-lg data-[closed]:sm:translate-y-0 data-[closed]:sm:scale-95 p-8"
className="h-4/6 relative transform overflow-y-auto rounded-lg bg-white text-left shadow-xl transition-all data-[closed]:translate-y-4 data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in sm:my-8 sm:w-full sm:max-w-lg data-[closed]:sm:translate-y-0 data-[closed]:sm:scale-95 p-8 border border-gray-200"
>
<form onSubmit={handleSubmit} className="flex flex-col text-xs">
<div className="flex flex-col justify-center items-center ">
Expand All @@ -96,43 +96,46 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
</section>
<section>
<span>What type of housing do you want?</span>
<div className="mb-4 flex flex-col gap-2 mt-2">
<label>
<div className="mb-4 flex flex-col gap-2 mt-2 ">
<label className="flex flex-row">
<input
type="radio"
name="leaselength"
value={LeaseLength.OneYear}
checked={formData.leaselength === LeaseLength.OneYear}
onChange={handleChange}
className="mr-2"
/>
{LeaseLength.OneYear}
<span >{LeaseLength.OneYear}</span>
</label>
<label className="">
<label className="flex flex-row">
<input
type="radio"
name="leaselength"
value={LeaseLength.ShortTerm}
checked={formData.leaselength === LeaseLength.ShortTerm}
onChange={handleChange}
className="mr-2"
/>
{LeaseLength.ShortTerm}
<span>{LeaseLength.ShortTerm}</span>
</label>
</div>
</section>
<section>
<span>When do you want to move in?</span>
<div className="mb-4 flex flex-col gap-2 mt-2">
<label>
<label className="flex flex-row">
<input
name="moveInTime"
type="radio"
value={MovingTimeline.ASAP}
checked={formData.moveInTime === MovingTimeline.ASAP}
onChange={handleChange}
className="mr-2"
/>
{MovingTimeline.ASAP}
</label>
<label className="">
<label className="flex flex-row">
<input
name="moveInTime"
type="radio"
Expand All @@ -141,10 +144,11 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
formData.moveInTime === MovingTimeline.lessthan3
}
onChange={handleChange}
className="mr-2"
/>
{MovingTimeline.lessthan3}
</label>
<label className="">
<label className="flex flex-row">
<input
name="moveInTime"
type="radio"
Expand All @@ -153,6 +157,7 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
formData.moveInTime === MovingTimeline.threeplus
}
onChange={handleChange}
className="mr-2"
/>
{MovingTimeline.threeplus}
</label>
Expand All @@ -161,7 +166,7 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
<section>
<span>How many housemates do you want to live with?</span>
<div className="mb-4 flex flex-col gap-2 mt-2">
<label>
<label className="flex flex-row">
<input
name="housematesCount"
type="radio"
Expand All @@ -170,10 +175,11 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
formData.housematesCount === RoommateCount.onetwo
}
onChange={handleChange}
className="mr-2"
/>
{RoommateCount.onetwo}
</label>
<label className="">
<label className="flex flex-row">
<input
name="housematesCount"
type="radio"
Expand All @@ -182,10 +188,11 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
formData.housematesCount === RoommateCount.threefive
}
onChange={handleChange}
className="mr-2"
/>
{RoommateCount.threefive}
</label>
<label className="">
<label className="flex flex-row">
<input
name="housematesCount"
type="radio"
Expand All @@ -194,10 +201,11 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
formData.housematesCount === RoommateCount.sixtwelve
}
onChange={handleChange}
className="mr-2"
/>
{RoommateCount.sixtwelve}
</label>
<label className="">
<label className="flex flex-row">
<input
name="housematesCount"
type="radio"
Expand All @@ -206,6 +214,7 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
formData.housematesCount === RoommateCount.twelveplus
}
onChange={handleChange}
className="mr-2"
/>
{RoommateCount.twelveplus}
</label>
Expand All @@ -219,7 +228,7 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
name="website"
value={formData.website || ""}
onChange={handleChange}
className="border p-2 rounded mb-4 w-full text-xs"
className="border p-2 rounded mb-4 w-full text-xs mt-2"
placeholder="gwern.net"
/>
</div>
Expand All @@ -232,7 +241,7 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
name="phone"
value={formData.phone || ""}
onChange={handleChange}
className="border p-2 rounded mb-4 w-full text-xs"
className="border p-2 rounded mb-4 w-full text-xs mt-2"
placeholder="123-456-7890"
/>
</div>
Expand All @@ -245,7 +254,7 @@ const UserListingModal: React.FC<UserListingModalProps> = ({
name="email"
value={formData.email || ""}
onChange={handleChange}
className="border p-2 rounded mb-4 w-full text-xs"
className="border p-2 rounded mb-4 w-full text-xs mt-2"
placeholder="[email protected]"
/>
</div>
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/components/compound/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faHouse, faUserPlus } from "@fortawesome/free-solid-svg-icons";
import { faUserPlus } from "@fortawesome/free-solid-svg-icons";
import UserDropdown from "./UserDropdown";
import HousingForm from "../../base/HousingForm";
import Referral from "../../base/Referral";
Expand All @@ -13,25 +13,24 @@ export default function NavBar() {

const getLinkClass = (path: string) => {
return location.pathname === path
? "px-4 py-2 rounded-md bg-cover bg-center bg-rainbow border-black border" // Active link style
: "px-4 py-2 border border-black rounded-md hover:bg-rainbow hover:bg-cover hover:bg-center"; // Inactive link style
? "px-2 py-1 sm:px-4 sm:py-2rounded-md bg-cover bg-center bg-rainbow border-black border " // Active link style
: "px-2 py-1 sm:px-4 sm:py-2border border-black rounded-md hover:bg-rainbow hover:bg-cover hover:bg-center"; // Inactive link style
};

return (
<nav className="top-0 left-0 right-0 bg-primary">
<div className="mx-auto px-4 py-2 flex justify-between items-center">
{/* Directory NY logo */}
<div className="flex-shrink-0 ml-6">
<div className="flex-shrink-0 mx-1 sm:ml-6">
<span className="text-xl font-bold font-serif">DirectoryNY</span>
</div>
<div className="flex items-center space-x-4">

<button
className="px-4 py-2 bg-black text-white rounded-full hover:bg-green-600"
onClick={() => setShowReferralForm(true)}
>
<FontAwesomeIcon icon={faUserPlus} className="mr-2" />
Invite a friend
<FontAwesomeIcon icon={faUserPlus} className="sm:mr-2" />
<span className="hidden sm:inline">Invite a friend</span>
</button>
<UserDropdown />
</div>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/pages/UnprotectedHomepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ const UnprotectedHomepage = () => {
<h1 className=" text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-center flex flex-col w-4/5 lg:w-3/4 xl:w-3/5">
<span >Find sublets, housemates, and coliving communities in the NYC Fractal Scene</span>
</h1>
<span className="text-center text-black text-md sm:text-lg lg:text-xl">A NY housing directory filled with people and houses we love</span>
<span className="text-center text-black text-md sm:text-lg lg:text-xl p-1">A NY housing directory filled with people and houses we love</span>
{/* <button onClick={() => navigate("/login/apply")} className="bg-white border-black border-[3px] text-black hover:bg-black/50 hover:text-white font-bold px-12 py-3 rounded-xl text-xl">Apply</button> */}
<span className="text-center text-md sm:text-lg lg:text-xl">
<SignInButton />
</span>


<div className="flex text-center gap-2 bg-pink-200/50 md:gap-4 p-4 md:mt-8 text-sm">
<span><span className="text-white font-bold">1412</span> members of DirectorySF</span>
<span><span className="text-white font-bold">108</span> listings this month 🌈</span>
Expand Down

0 comments on commit ff126cf

Please sign in to comment.