workfloworchestrator / orchestrator-ui-library

Component library for the orchestrator-ui (v2) which is published in npm
8 stars 3 forks source link

Change in hooks error when adding translations #177

Closed DutchBen closed 1 week ago

DutchBen commented 1 year ago

Adding the useTranslation hook to these files triggers a 'detected a change in the order of Hooks called ' error. It seems like it has something to do with the use of useContext. Creating this ticket to keep this out of the scope of the translation ticket

packages/orchestrator-ui-components/src/components/Subscription/ProcessesTimeline.tsx packages/orchestrator-ui-components/src/components/Subscription/SubscriptionGeneral.tsx

Image

wouter1975 commented 9 months ago

@DutchBen is this still relevant?

Georgi2704 commented 2 weeks ago

@wouter1975 @DutchBen WfoSubscriptionGeneral.tsx: const t = useTranslations('subscriptions.detail'); WfoProcessesTimeline.tsx const t = useTranslations('subscriptions.detail.processDetail');

Both files are already using translation and don't seem to throw any errors in the console. I think this can be closed.