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 thepackage.json
file
1.1.0
Optimized user benefits acquisition pipeline and implemented a reliable SSG solution.
Optimizations and Fixes
- Moved the
useSearchParams
call inAuthProvider.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
- 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 methodgetClientUserBenefits
- 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 methodoptimisticDeduct
and data refetch methodmutate(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 methodmutate(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.
- Fixed SSG implementation, see update record
- Updated
app/[locale]/layout.tsx
- Updated
app/[locale]/blogs/[slug]/page.tsx
, extractedlocale
fromparams
instead of usinggetLocale()
1.1.1
Fixes
GoogleOneTap
checks if environment variables are configured, see update record 1 and update record 2
components/auth/GoogleOneTap.tsx