refactor(planner): import shared types in DesktopDayTile instead of re-declaring
Removes local TagItem, SlotRecipe, Slot, Suggestion interfaces and imports Recipe, Slot, Suggestion from types.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,33 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import EmptyDayTile from './EmptyDayTile.svelte';
|
import EmptyDayTile from './EmptyDayTile.svelte';
|
||||||
import { formatDayAbbr } from '$lib/planner/week';
|
import { formatDayAbbr } from '$lib/planner/week';
|
||||||
|
import type { Recipe, Slot, Suggestion } from '$lib/planner/types';
|
||||||
interface TagItem {
|
|
||||||
id?: string;
|
|
||||||
name?: string;
|
|
||||||
tagType?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SlotRecipe {
|
|
||||||
id?: string;
|
|
||||||
name?: string;
|
|
||||||
effort?: string;
|
|
||||||
cookTimeMin?: number;
|
|
||||||
heroImageUrl?: string | null;
|
|
||||||
tags?: TagItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Slot {
|
|
||||||
id?: string | null;
|
|
||||||
slotDate?: string;
|
|
||||||
recipe?: SlotRecipe | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Suggestion {
|
|
||||||
recipe: any;
|
|
||||||
scoreDelta: number;
|
|
||||||
hasConflict: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
let {
|
let {
|
||||||
slot,
|
slot,
|
||||||
|
|||||||
Reference in New Issue
Block a user