Menu

nexty-flux-kontext Version Updates

Good to know

  • This chapter contains version update records for the nexty-flux-kontext repository.
  • For version numbers, please check the version field in the package.json file

1.1.0

Optimized user benefits acquisition pipeline and implemented a reliable SSG solution.

Optimizations and Fixes

  1. Moved the useSearchParams call in AuthProvider.tsx down to the login component to maintain layout server-side rendering, see update record
  • Updated components/providers/AuthProvider.tsx
  • Updated app/[locale]/login/LoginPage.tsx
  • Updated app/[locale]/login/page.tsx
  1. The original user benefits acquisition pipeline was complex, not beginner-friendly, and affected SSG. Therefore, we optimized the way benefits are acquired and used, see update record 1 and update record 2
  • Installed dependency swr: pnpm i swr
  • Updated app/[locale]/layout.tsx
  • Updated actions/usage/benefits.ts, added client-side user benefits acquisition method getClientUserBenefits
  • Added hooks/useUserBenefits.ts to share user benefits request, update methods and data state
  • Updated app/[locale]/pricing/FlashSaleBanner.tsx, changed from calling @/stores/benefitsStore to calling @/hooks/useUserBenefits. Since both files provide the same method names, no other code changes were needed in this file
  • Updated components/layout/CurrentUserBenefitsDisplay.tsx, changed from calling @/stores/benefitsStore to calling @/hooks/useUserBenefits. Since both files provide the same method names, no other code changes were needed in this file
  • Updated components/header/UserInfo.tsx
  • Updated app/[locale]/(gen-image)/flux-kontext-pro/FluxKontextProClient.tsx to use the new optimistic update method optimisticDeduct and data refetch method mutate(revalidateBenefits)
  • Updated app/[locale]/(gen-image)/multi-image-kontext-pro/MultiImageKontextProClient.tsx, same as above
  • Updated app/[locale]/payment/success/page.tsx to use the data refetch method mutate(revalidateBenefits) for immediate benefits update
  • Removed components/layout/BenefitsErrorBoundary.tsx
  • Removed components/providers/BenefitsInitializer.tsx
  • Removed components/providers/BenefitsProvider.tsx
  • Removed stores/benefitsStore.ts

For secondary development features, whether adding or deducting points, always call mutate(revalidateBenefits) to immediately synchronize database points.

  1. Fixed SSG implementation, see update record
  • Updated app/[locale]/layout.tsx
  • Updated app/[locale]/blogs/[slug]/page.tsx, extracted locale from params instead of using getLocale()

1.1.1

Fixes

  1. GoogleOneTap checks if environment variables are configured, see update record 1 and update record 2
  • components/auth/GoogleOneTap.tsx