Skip to content

Replace any types in client-portal quote block renderer #72

Description

@aruneshwisdm

Summary

The client-facing quote block renderer component has a blanket `eslint-disable @typescript-eslint/no-explicit-any` at the top of the file, and uses `any` for block content types and line item maps. Since the `QuoteBlock` type is already imported, the content should be properly typed per block type.

Current code

In `apps/web/components/client-portal/quote-block-renderer.tsx`:

/* eslint-disable @typescript-eslint/no-explicit-any */  // line 1
const block = { ...rawBlock, content: rawBlock.content as any };  // line 23
{block.content.items.map((item: any) => (  // line 106

What to do

  1. Remove the blanket `eslint-disable` at the top of the file
  2. Create a type-narrowing pattern based on `block.type` (e.g., `if (block.type === 'service-group') { ... }`) so that `block.content` is properly typed within each branch
  3. Replace the `(item: any)` in the service group items map with the proper item type from `QuoteBlock` content definitions

Files

  • `apps/web/components/client-portal/quote-block-renderer.tsx`
  • `apps/web/lib/quotes/types.ts` (for the `QuoteBlock` type definitions)

Acceptance criteria

  • The blanket `eslint-disable` comment is removed from the top of the file
  • `block.content` is no longer cast to `any`
  • Line item maps use proper types instead of `any`
  • Build passes with `pnpm build`
  • No regressions in the client portal quote view

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions