Skip to content

refactor: use the SDK recommendation client - #1240

Draft
TaprootFreak wants to merge 1 commit into
developfrom
feat/use-packages-recommendation
Draft

refactor: use the SDK recommendation client#1240
TaprootFreak wants to merge 1 commit into
developfrom
feat/use-packages-recommendation

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

Consumer side of step 2 of DFXswiss/packages#198: use the recommendation client from
@dfx.swiss/react and drop the local copies.

Depends on DFXswiss/packages#200.

Changes

  • src/dto/recommendation.dto.ts and src/hooks/recommendation.hook.ts are gone; the types and
    useRecommendation now come from the package.
  • confirmRecommendation / rejectRecommendation take the id instead of the whole recommendation —
    the id was the only part that ever reached the wire.

Before this can go green

The package pin in package.json still points at the published @dfx.swiss/react, which does not
export useRecommendation yet. CI stays red until DFXswiss/packages#200 is merged and published
and the pin is raised here.
Verified locally against a build of that branch: tsc clean,
npm run lint clean, full suite at 673 passing with no new failures (the two suites failing on
develop today still fail, unchanged).

Note for whoever picks this up: the package types expirationDate as optional, because the API omits
it for mail invitations. The local copy declared it required. Any code that formats that date
unconditionally was rendering an invalid date for exactly that case.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🤖 PR Review Bot

❌ TypeScript: 8 errors


This is an automated review. Please address the issues above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant