fix: add RecipeTag type to support API response format
Some checks failed
Basil CI/CD Pipeline / Code Linting (pull_request) Successful in 1m9s
Basil CI/CD Pipeline / Shared Package Tests (pull_request) Successful in 1m12s
Basil CI/CD Pipeline / Web Tests (pull_request) Successful in 1m20s
Basil CI/CD Pipeline / API Tests (pull_request) Successful in 1m36s
Basil CI/CD Pipeline / Security Scanning (pull_request) Successful in 1m12s
Basil CI/CD Pipeline / Build All Packages (pull_request) Failing after 1m24s
Basil CI/CD Pipeline / E2E Tests (pull_request) Has been skipped
Basil CI/CD Pipeline / Build & Push Docker Images (pull_request) Has been skipped
Basil CI/CD Pipeline / Trigger Deployment (pull_request) Has been skipped

Update Recipe.tags to support both string and RecipeTag object formats
to match what the API actually returns (tags with nested tag objects).
This fixes TypeScript compilation errors in RecipeDetail.tsx.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Paul R Kartchner
2026-01-16 22:57:31 -07:00
parent 44b0ff2a85
commit 0871727e57

View File

@@ -15,7 +15,7 @@ export interface Recipe {
author?: string;
cuisine?: string;
categories?: string[]; // Changed from single category to array
tags?: string[];
tags?: (string | RecipeTag)[]; // Can be strings or RecipeTag objects from API
rating?: number;
createdAt: Date;
updatedAt: Date;
@@ -98,6 +98,10 @@ export interface Tag {
name: string;
}
export interface RecipeTag {
tag: Tag;
}
export interface Cookbook {
id: string;
name: string;