redesign console page

This commit is contained in:
2026-09-03 12:31:07 +05:30
parent d39956a2f1
commit e1bb0a5307
22 changed files with 2478 additions and 22 deletions

View File

@@ -0,0 +1,21 @@
import { createContext, useContext } from 'react';
/**
* What Nearle Buddy is currently answering about.
*
* The panel names its own scope in its heading — "Across your branches" — and
* that heading is a promise about which data an answer would draw on. When an
* admin narrows to one branch, or a store user opens the console at all, the
* promise is wrong: the board beneath says R mart and the panel above still
* says every branch.
*
* So the SCOPE is published here and the panel reads it. Nothing else about
* Buddy changes — not its width, its controls, its prompts or its placement.
* A page that has no branch scope publishes nothing and the panel keeps the
* per-route wording it has always used.
*/
export const AssistantScopeContext = createContext<string | undefined>(undefined);
export function useAssistantScope(): string | undefined {
return useContext(AssistantScopeContext);
}