feat(04-01): implement marketplace page and marketplace-store
Create marketplace-store (Zustand) with sidebarRefreshKey signal and tenant context. Build /marketplace page with parallel fetch, activation Map, role gate, empty state, and responsive card grid. All 9 tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface MarketplaceState {
|
||||
sidebarRefreshKey: number;
|
||||
bumpSidebarRefresh: () => void;
|
||||
selectedTenantId: string | null;
|
||||
setSelectedTenantId: (id: string | null) => void;
|
||||
}
|
||||
|
||||
export const useMarketplaceStore = create<MarketplaceState>()((set) => ({
|
||||
sidebarRefreshKey: 0,
|
||||
bumpSidebarRefresh: () => set((state) => ({ sidebarRefreshKey: state.sidebarRefreshKey + 1 })),
|
||||
selectedTenantId: null,
|
||||
setSelectedTenantId: (id) => set({ selectedTenantId: id }),
|
||||
}));
|
||||
Reference in New Issue
Block a user