fix(types): add missing useEffect import and fix type mismatches
continuous-integration/drone/push Build is passing Details

Fixes from tsc type checking:
- Re-added useEffect import to ClubCourtsTab (used in CourtFormModal)
- Updated mock courts data to include created_at/updated_at timestamps
- Fixed CourtError dependencies type to match CourtDependencies structure
  (slot_instances_future/booked instead of upcoming_bookings)

All court-related TypeScript errors resolved. Build succeeds.
master
Guillermo Pages 1 month ago
parent 86fa2a92e6
commit 9186b35649

@ -1,6 +1,6 @@
'use client';
import { useState } from 'react';
import { useState, useEffect } from 'react';
import { Loader2, AlertCircle, Plus, Edit, Trash2, AlertTriangle, X } from 'lucide-react';
import {
createCourt,

@ -168,9 +168,24 @@ export const MOCK_CLUB_DETAIL: AdminClubDetail = {
timezone: 'Europe/Zurich',
},
courts: [
{ court_id: 1, name: 'Court 1' },
{ court_id: 2, name: 'Court 2' },
{ court_id: 3, name: 'Court 3' },
{
court_id: 1,
name: 'Court 1',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
},
{
court_id: 2,
name: 'Court 2',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
},
{
court_id: 3,
name: 'Court 3',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z',
},
],
slot_definitions: [],
upcoming_slots: [],

@ -96,7 +96,8 @@ export interface CourtError {
errors?: ValidationError[];
dependencies?: {
slot_definitions: number;
upcoming_bookings: number;
slot_instances_future: number;
slot_instances_booked: number;
};
}

Loading…
Cancel
Save