Vitron-Front/app/requestHandler
fazli 6a300b8760 fix(store): don't bounce owners home, stop cross-user myStores cache
- app/hooks/useStoreOwnership.ts: the old redirect logic sent owners to /
  the moment useMyStores briefly resolved to []. That empty array came from
  useMyStores's dead `if (!token) return []` inside the queryFn, so any
  transient auth blip left the store page thinking the user has no stores.
  Now compares usernames case-insensitively, only redirects while the query
  is settled (!isLoading && !isFetching && !isError), and never bounces to
  home on empty — worst case the seller sees an empty dashboard rather than
  a silent kick-out.
- app/requestHandler/use-seller-hooks.ts: removed the unreachable
  `if (!token) return []` in useMyStores and added the token to the
  queryKey so a login switch stops serving the previous user's cached list.
- app/routes/store.$storeId._index.tsx: mount StorePushPromptCard at the
  top of the store dashboard.
- app/routes/store.$storeId.tsx: sidebar "پیام‌ها" badge reads
  badges.sellerChat[storeId] (per-store) instead of the buyer-side
  badges.chat, matching the badge-serializer split.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-18 13:18:23 +00:00
..
use-address-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-auth-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-bookmark-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-cart-hooks.ts first 2026-04-29 01:44:16 +03:30
use-chat-hooks.tsx feat(chat): share the product into the chat + fix empty-thread preview 2026-07-13 15:09:01 +03:30
use-collection-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-comments-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-courier-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-discount-hooks.ts first 2026-04-29 01:44:16 +03:30
use-explore-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-following-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-home-hooks.ts fix(product): detail page price now matches list tiles + fresher feeds 2026-06-22 19:55:11 +00:00
use-instagram-hooks.ts first 2026-04-29 01:44:16 +03:30
use-media-hooks.ts first 2026-04-29 01:44:16 +03:30
use-order-hooks.ts first 2026-04-29 01:44:16 +03:30
use-product-hooks.ts feat(seller): inline quick-edit for product & variant prices 2026-07-09 12:41:04 +03:30
use-profile-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-search-hooks.ts first 2026-04-29 01:44:16 +03:30
use-seller-hooks.ts fix(store): don't bounce owners home, stop cross-user myStores cache 2026-07-18 13:18:23 +00:00
use-shipping-hooks.ts first 2026-04-29 01:44:16 +03:30
use-user-collection-hooks.tsx first 2026-04-29 01:44:16 +03:30
use-view-hooks.ts feat(product): record product views for recommendations 2026-06-29 13:57:04 +03:30
use-wallet-hooks.tsx first 2026-04-29 01:44:16 +03:30