-
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
8f02d43
commit 19ef976
Showing
7 changed files
with
52 additions
and
137 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
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,29 +1,5 @@ | ||
// src/app/properties/page.tsx | ||
import { createClient } from '@/lib/supabase-server' | ||
import PropertiesList from '@/components/PropertiesList' | ||
import { Property } from '@/types/property' | ||
|
||
export default async function PropertiesPage() { | ||
const supabase = createClient() | ||
|
||
const { data: properties, error } = await supabase | ||
.from('properties') | ||
.select(` | ||
*, | ||
property_images ( | ||
id, | ||
cloudinary_public_id, | ||
cloudinary_url, | ||
is_primary | ||
) | ||
`) | ||
.order('created_at', { ascending: false }) | ||
|
||
if (error) { | ||
console.error('Error fetching properties:', error) | ||
// Handle error appropriately | ||
return <div>Error loading properties</div> | ||
} | ||
|
||
return <PropertiesList properties={properties} /> | ||
return <PropertiesList /> | ||
} |
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
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 was deleted.
Oops, something went wrong.