Skip to content

Commit 94f67fd

Browse files
authored
fix(ui): Set lazy calendar component type (#52381)
1 parent 5a63ff0 commit 94f67fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

static/app/components/calendar/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import Placeholder from 'sentry/components/placeholder';
66
import type {DatePickerProps} from './datePicker';
77
import type {DateRangePickerProps} from './dateRangePicker';
88

9-
const LazyDatePicker = lazy(() => import('./datePicker'));
10-
const LazyDateRangePicker = lazy(() => import('./dateRangePicker'));
9+
// Explicity set component type to avoid complex React.lazy type
10+
const LazyDatePicker: React.FC<DatePickerProps> = lazy(() => import('./datePicker'));
11+
const LazyDateRangePicker: React.FC<DateRangePickerProps> = lazy(
12+
() => import('./dateRangePicker')
13+
);
1114

1215
function CalendarSuspenseWrapper({children}: {children: React.ReactNode}) {
1316
return (

0 commit comments

Comments
 (0)