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 commit history
- 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 commit history 1 and commit history 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 commit history
- 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 commit history 1 and commit history 2
components/auth/GoogleOneTap.tsx
1.1.2
Improvements
- Login and payment buttons now redirect to the login page with the current page path included in the URL for post-login redirection. See commit history
components/pricing/PricingCTA.tsx
Bug Fixes
- Fixed an issue where login would fail when the URL parameter
next
was an empty string. This bug was introduced in version 2.3.0 whenLoginForm.tsx
was modified. This update includes a fallback solution. See commit history
app/auth/callback/route.ts
app/auth/confirm/route.ts
1.2.0
Optimizations
- Updated layout, dashboard uses Shadcn Sidebar component to reconstruct left-right layout, while other pages maintain the original top-middle-bottom layout, see commit history
- Execute
pnpm dlx shadcn@latest add sidebar
- Created folder
app/[locale]/(basic-layout)
, added fileapp/[locale]/(basic-layout)/layout.tsx
- Moved all files and folders under
app/[locale]
folder, exceptapp/[localte]/layout.tsx
andapp/[locale]/(protected)
, intoapp/[localte]/(basic-layout)
- Updated
app/[locale]/layout.tsx
, removedHeader
andFooter
references, removed<main>
tag (do not removechildren
inside<main>
) - Added
app/[locale]/(protected)/dashboard/DashboardSidebar.tsx
- Added
components/header/SidebarInsetHeader.tsx
- Updated
app/[locale]/(protected)/dashboard/layout.tsx
, using new Sidebar - Added directory icons to
UserMenus
andAdminMenus
ini18n/message/en/common.json
,i18n/message/en/common.json
andi18n/message/en/common.json
- Removed
app/[locale]/(protected)/dashboard/Sidebar.tsx
- Removed
app/[locale]/(protected)/dashboard/MobileSidebar.tsx
- Component style optimizations:
components/header/UserInfo.tsx
components/header/UserAvatar.tsx
components/header/MobileMenu.tsx
components/header/HeaderLinks.tsx
components/header/Header.tsx
- Optimized copy styles
components/mdx/CopyButton.tsx
New Features
- Added admin overview page, see commit history
- Execute
pnpm dlx shadcn@latest add chart
- Migrated new SQL files:
supabase/migrations/20250812143117_create_order_stats_function.sql
,supabase/migrations/20250812151308_create_daily_growth_stats_function.sql
, see update method - Added Server Actions
actions/overview
- Added page
app/[locale]/(protected)/dashboard/(admin)/overview
- Updated
lib/supabase/middleware.ts
, added/dashboard/overview
to admin permission pages - Updated
lib/utils.ts
, added number formatting methods - Updated multilingual packages
- Edited directories:
i18n/messages/en/common.json
,i18n/messages/ja/common.json
,i18n/messages/zh/common.json
, added new page directory items - Added new page language packages:
i18n/messages/en/Dashboard/Admin/Overview.json
,i18n/messages/ja/Dashboard/Admin/Overview.json
,i18n/messages/zh/Dashboard/Admin/Overview.json
- Edited
i18n/request.ts
, imported new page language packages
- Edited directories:
- Added admin orders viewing page, see commit history
- Added Server Actions
actions/orders
- Added page
app/[locale]/(protected)/dashboard/(admin)/orders
- Updated
lib/supabase/middleware.ts
, added/dashboard/orders
to admin permission pages - Updated multilingual packages
- Edited directories:
i18n/messages/en/common.json
,i18n/messages/ja/common.json
,i18n/messages/zh/common.json
, added new page directory items - Added new page language packages:
i18n/messages/en/Dashboard/Admin/Orders.json
,i18n/messages/ja/Dashboard/Admin/Orders.json
,i18n/messages/zh/Dashboard/Admin/Orders.json
- Edited
i18n/request.ts
, imported new page language packages
- Edited directories: