Extract shared types to src/types/dashboard.ts
Consolidate duplicated type definitions (User, Settings, Widget, CalendarEvent, CalendarSource, NoteBoardItem, etc.) into a single shared types file. Removes ~100 lines of duplicated type code across page.tsx, settings/page.tsx, NoteWidget.tsx, and CalendarWidget.tsx. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,22 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useMemo, useState } from "react";
|
||||
|
||||
type CalendarEvent = {
|
||||
id: string;
|
||||
title: string;
|
||||
start: string;
|
||||
end: string | null;
|
||||
location: string | null;
|
||||
};
|
||||
|
||||
type CalendarSource = {
|
||||
id: string;
|
||||
name: string;
|
||||
color: string;
|
||||
type: string;
|
||||
passwordConfigured: boolean;
|
||||
};
|
||||
import type { CalendarEvent, CalendarSource } from "@/types/dashboard";
|
||||
|
||||
type CalendarWidgetProps = {
|
||||
widgetId: string;
|
||||
|
||||
Reference in New Issue
Block a user