From 03e5985fee0432664c0e42d77230ca9953f6b483 Mon Sep 17 00:00:00 2001 From: asabizanjo Date: Fri, 12 Dec 2025 00:59:35 +0000 Subject: [PATCH] new listing --- src/app/page.tsx | 3 +- src/components/list-property/LivePreview.tsx | 86 --- .../list-property/PropertyAmenities.tsx | 42 -- .../list-property/PropertyCapacity.tsx | 48 -- .../list-property/PropertyDescription.tsx | 32 - .../list-property/PropertyInstantApproval.tsx | 35 -- .../list-property/PropertyLocation.tsx | 29 - .../list-property/PropertyPhotos.tsx | 94 --- .../list-property/PropertyPlaceType.tsx | 34 - .../list-property/PropertyPrice.tsx | 24 - src/components/list-property/PropertyType.tsx | 32 - .../list-property/SafetyDetails.tsx | 43 -- src/components/list-property/list.tsx | 583 +++++++++++++----- src/components/list-property/styles.ts | 18 - src/components/list-property/types.ts | 23 - 15 files changed, 433 insertions(+), 693 deletions(-) delete mode 100644 src/components/list-property/LivePreview.tsx delete mode 100644 src/components/list-property/PropertyAmenities.tsx delete mode 100644 src/components/list-property/PropertyCapacity.tsx delete mode 100644 src/components/list-property/PropertyDescription.tsx delete mode 100644 src/components/list-property/PropertyInstantApproval.tsx delete mode 100644 src/components/list-property/PropertyLocation.tsx delete mode 100644 src/components/list-property/PropertyPhotos.tsx delete mode 100644 src/components/list-property/PropertyPlaceType.tsx delete mode 100644 src/components/list-property/PropertyPrice.tsx delete mode 100644 src/components/list-property/PropertyType.tsx delete mode 100644 src/components/list-property/SafetyDetails.tsx delete mode 100644 src/components/list-property/styles.ts delete mode 100644 src/components/list-property/types.ts diff --git a/src/app/page.tsx b/src/app/page.tsx index 0390966..4154c8c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -16,12 +16,13 @@ import Signup from "@/components/authentication/signup"; import Landing from "@/pages/landing/page"; import Profile from "@/pages/profile/page"; + export default function Home() { return ( <>
- +
diff --git a/src/components/list-property/LivePreview.tsx b/src/components/list-property/LivePreview.tsx deleted file mode 100644 index b41ff6e..0000000 --- a/src/components/list-property/LivePreview.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import Image from "next/image"; -import { Camera, Star } from "@phosphor-icons/react/dist/ssr"; -import { FormData } from "./types"; -import { figtree } from "./styles"; - -export const LivePreview = ({ data }: { data: FormData }) => { - // Helpers to derive display values - const getCity = () => { - if (!data.location) return "YOUR CITY"; - const parts = data.location.split(','); - return parts[0].trim().toUpperCase(); - }; - - const getTitle = () => { - if (data.title) return data.title; - const type = data.propertyType ? data.propertyType.charAt(0).toUpperCase() + data.propertyType.slice(1) : "Property"; - const place = data.placeType === 'entire' ? 'Entire place' : data.placeType === 'room' ? 'Private room' : 'Shared room'; - return `${type} · ${place}`; - }; - - const getPrice = () => { - return data.price ? `₨${parseInt(data.price).toLocaleString()}` : "₨0"; - }; - - return ( -
-
-
-

Preview

-
- New -
-
- - {/* Card Replica */} -
- {/* Image Placeholder */} -
- {data.photos && data.photos.length > 0 ? ( - Preview - ) : ( -
- - Cover Photo -
- )} -
- - {/* Details */} -
-
-

- {getCity()} -

-
- - New -
-
- -

- {getTitle()} -

- -

- {getPrice()} - night -

-
-
- - {/* Live Updates Summary */} -
-
- Guests - {data.guests || 0} -
-
- Amenities - {data.amenities?.length || 0} selected -
-
-
-
- ); -}; diff --git a/src/components/list-property/PropertyAmenities.tsx b/src/components/list-property/PropertyAmenities.tsx deleted file mode 100644 index 59f0949..0000000 --- a/src/components/list-property/PropertyAmenities.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { WifiHigh, CookingPot, Car, SwimmingPool, Wind, TelevisionSimple } from "@phosphor-icons/react/dist/ssr"; -import { StepProps } from "./types"; -import { titleStyle, subtitleStyle, optionCardStyle, figtree } from "./styles"; - -export const PropertyAmenities = ({ data, updateData }: StepProps) => { - const amenities = [ - { id: 'wifi', label: 'Wi-Fi', icon: WifiHigh }, - { id: 'kitchen', label: 'Kitchen', icon: CookingPot }, - { id: 'parking', label: 'Free parking', icon: Car }, - { id: 'pool', label: 'Pool', icon: SwimmingPool }, - { id: 'ac', label: 'Air conditioning', icon: Wind }, // Using House as placeholder for AC if needed - { id: 'tv', label: 'TV', icon: TelevisionSimple }, - ]; - - const toggleAmenity = (id: string) => { - const current = data.amenities || []; - const updated = current.includes(id) - ? current.filter((item: string) => item !== id) - : [...current, id]; - updateData('amenities', updated); - }; - - return ( -
-

What does your place offer?

-

You can add more amenities after you publish.

-
- {amenities.map((amenity) => ( - - ))} -
-
- ) -} diff --git a/src/components/list-property/PropertyCapacity.tsx b/src/components/list-property/PropertyCapacity.tsx deleted file mode 100644 index 510a841..0000000 --- a/src/components/list-property/PropertyCapacity.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { StepProps, FormData } from "./types"; -import { titleStyle, subtitleStyle, figtree } from "./styles"; - -export const PropertyCapacity = ({ data, updateData }: StepProps) => { - const counters: { key: keyof FormData; label: string }[] = [ - { key: 'guests', label: 'Guests' }, - { key: 'bedrooms', label: 'Bedrooms' }, - { key: 'beds', label: 'Beds' }, - { key: 'bathrooms', label: 'Bathrooms' }, - ]; - - const updateCount = (key: keyof FormData, delta: number) => { - const current = (data[key] as number) || 0; - updateData(key, Math.max(0, current + delta)); - }; - - return ( -
-

Share some basics about your place

-

You'll add more details later, like bed types.

-
- {counters.map((item) => ( -
- {item.label} -
- - {data[item.key] || 0} - -
-
- ))} -
-
- ) -} diff --git a/src/components/list-property/PropertyDescription.tsx b/src/components/list-property/PropertyDescription.tsx deleted file mode 100644 index 9344ce5..0000000 --- a/src/components/list-property/PropertyDescription.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { StepProps } from "./types"; -import { titleStyle, subtitleStyle, inputStyle } from "./styles"; - -export const PropertyDescription = ({ data, updateData }: StepProps) => { - return ( -
-

How would you describe your place?

-

Short and sweet works best.

-
-
- - updateData('title', e.target.value)} - /> -
-
- -