mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 06:31:14 -05:00
Fix homepage date column names
This commit is contained in:
@@ -14,9 +14,9 @@ export function useHomepageRecentlyClosedParks(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('parks')
|
||||
.select(`*, location:locations(*), operator:companies!parks_operator_id_fkey(*)`)
|
||||
.gte('closed_date', toDateOnly(oneYearAgo))
|
||||
.lte('closed_date', toDateOnly(today))
|
||||
.order('closed_date', { ascending: false })
|
||||
.gte('closing_date', toDateOnly(oneYearAgo))
|
||||
.lte('closing_date', toDateOnly(today))
|
||||
.order('closing_date', { ascending: false })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
@@ -40,9 +40,9 @@ export function useHomepageRecentlyClosedRides(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('rides')
|
||||
.select(`*, park:parks(*, location:locations(*))`)
|
||||
.gte('closed_date', toDateOnly(oneYearAgo))
|
||||
.lte('closed_date', toDateOnly(today))
|
||||
.order('closed_date', { ascending: false })
|
||||
.gte('closing_date', toDateOnly(oneYearAgo))
|
||||
.lte('closing_date', toDateOnly(today))
|
||||
.order('closing_date', { ascending: false })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
@@ -14,9 +14,9 @@ export function useHomepageClosingSoonParks(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('parks')
|
||||
.select(`*, location:locations(*), operator:companies!parks_operator_id_fkey(*)`)
|
||||
.gte('closed_date', toDateOnly(today))
|
||||
.lte('closed_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('closed_date', { ascending: true })
|
||||
.gte('closing_date', toDateOnly(today))
|
||||
.lte('closing_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('closing_date', { ascending: true })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
@@ -40,9 +40,9 @@ export function useHomepageClosingSoonRides(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('rides')
|
||||
.select(`*, park:parks(*, location:locations(*))`)
|
||||
.gte('closed_date', toDateOnly(today))
|
||||
.lte('closed_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('closed_date', { ascending: true })
|
||||
.gte('closing_date', toDateOnly(today))
|
||||
.lte('closing_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('closing_date', { ascending: true })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
@@ -13,8 +13,8 @@ export function useHomepageRecentlyOpenedParks(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('parks')
|
||||
.select(`*, location:locations(*), operator:companies!parks_operator_id_fkey(*)`)
|
||||
.gte('opened_date', toDateOnly(oneYearAgo))
|
||||
.order('opened_date', { ascending: false })
|
||||
.gte('opening_date', toDateOnly(oneYearAgo))
|
||||
.order('opening_date', { ascending: false })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
@@ -37,8 +37,8 @@ export function useHomepageRecentlyOpenedRides(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('rides')
|
||||
.select(`*, park:parks(*, location:locations(*))`)
|
||||
.gte('opened_date', toDateOnly(oneYearAgo))
|
||||
.order('opened_date', { ascending: false })
|
||||
.gte('opening_date', toDateOnly(oneYearAgo))
|
||||
.order('opening_date', { ascending: false })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
@@ -14,9 +14,9 @@ export function useHomepageOpeningSoonParks(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('parks')
|
||||
.select(`*, location:locations(*), operator:companies!parks_operator_id_fkey(*)`)
|
||||
.gte('opened_date', toDateOnly(today))
|
||||
.lte('opened_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('opened_date', { ascending: true })
|
||||
.gte('opening_date', toDateOnly(today))
|
||||
.lte('opening_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('opening_date', { ascending: true })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
@@ -40,9 +40,9 @@ export function useHomepageOpeningSoonRides(enabled = true) {
|
||||
const { data, error } = await supabase
|
||||
.from('rides')
|
||||
.select(`*, park:parks(*, location:locations(*))`)
|
||||
.gte('opened_date', toDateOnly(today))
|
||||
.lte('opened_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('opened_date', { ascending: true })
|
||||
.gte('opening_date', toDateOnly(today))
|
||||
.lte('opening_date', toDateOnly(sixMonthsFromNow))
|
||||
.order('opening_date', { ascending: true })
|
||||
.limit(12);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
Reference in New Issue
Block a user