From 02a02ba9e6b95b076e08890c425e3fad56584b95 Mon Sep 17 00:00:00 2001 From: kovakmedya Date: Thu, 30 Apr 2026 06:39:27 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20footer=20rebrand=20+=20i=C3=A7=20sayfada?= =?UTF-8?q?=20genel-bak=C4=B1=C5=9F'a=20yanl=C4=B1=C5=9F=20redirect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) Footer The template's 'Made with ❤ by ShadcnStore Team' is gone. Footer now shows '© İşletmem — bir KovakSoft ürünüdür.' on the left and Kullanım şartları / Gizlilik links on the right. Compact one-line layout on desktop, stacked on mobile. 2) Internal pages were redirecting users to /onboarding (and from there to /dashboard) even when they had a valid tenant. Root cause: requireTenant() called getActiveTenantId() and threw NO_TENANT when the active-tenant cookie/prefs were missing — even though the user's actually a member of one or more teams. getActiveContext() already handled this fallback for the layout, but the per-page requireTenant() guard didn't, so /customers, /tasks, /invoices, etc. all bounced through /onboarding back to /dashboard. - requireTenant() now falls back to the user's first team via teams.list(), and writes the cookie so the next request is fast. 3) Side fix: acceptInviteAction now sets account.prefs.activeTenant + the ACTIVE_TENANT cookie after successful join, so a freshly invited member lands directly in the right workspace instead of relying on the team-list fallback. --- src/components/site-footer.tsx | 33 ++++++++++++++++++-------------- src/lib/appwrite/team-actions.ts | 31 +++++++++++++++++++++++++++++- src/lib/appwrite/tenant-guard.ts | 25 ++++++++++++++++++++++-- 3 files changed, 72 insertions(+), 17 deletions(-) diff --git a/src/components/site-footer.tsx b/src/components/site-footer.tsx index 59edbaa..7c978a9 100644 --- a/src/components/site-footer.tsx +++ b/src/components/site-footer.tsx @@ -1,27 +1,32 @@ -import { Heart } from "lucide-react" import Link from "next/link" export function SiteFooter() { + const year = new Date().getFullYear() return ( -