status message display fix (agent)
This commit is contained in:
parent
bab0b1810f
commit
dca21cf762
@ -49,6 +49,8 @@ interface AppContextType {
|
|||||||
currentProject: string | null;
|
currentProject: string | null;
|
||||||
setCurrentProject: (slug: string | null) => void;
|
setCurrentProject: (slug: string | null) => void;
|
||||||
onSignOut: () => void;
|
onSignOut: () => void;
|
||||||
|
statusMessage: string;
|
||||||
|
setStatusMessage: (message: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AppContext = createContext<AppContextType | null>(null);
|
export const AppContext = createContext<AppContextType | null>(null);
|
||||||
@ -64,6 +66,7 @@ export default function App() {
|
|||||||
const [user, setUser] = useState<User | null>(null);
|
const [user, setUser] = useState<User | null>(null);
|
||||||
const [currentProject, setCurrentProject] = useState<string | null>(null);
|
const [currentProject, setCurrentProject] = useState<string | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
const [statusMessage, setStatusMessage] = useState<string>('Ready.');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const storedUser = getStoredUser();
|
const storedUser = getStoredUser();
|
||||||
@ -110,7 +113,7 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppContext.Provider value={{ user, currentProject, setCurrentProject: handleSetCurrentProject, onSignOut: handleSignOut }}>
|
<AppContext.Provider value={{ user, currentProject, setCurrentProject: handleSetCurrentProject, onSignOut: handleSignOut, statusMessage, setStatusMessage }}>
|
||||||
<div className="h-screen flex flex-col bg-bg-primary">
|
<div className="h-screen flex flex-col bg-bg-primary">
|
||||||
<Header user={user} onSignOut={handleSignOut} />
|
<Header user={user} onSignOut={handleSignOut} />
|
||||||
<main className="flex-1 flex overflow-hidden">
|
<main className="flex-1 flex overflow-hidden">
|
||||||
@ -143,7 +146,7 @@ export default function App() {
|
|||||||
/>
|
/>
|
||||||
</Routes>
|
</Routes>
|
||||||
</main>
|
</main>
|
||||||
<StatusBar projectSlug={currentProject} />
|
<StatusBar statusMessage={statusMessage} projectSlug={currentProject} />
|
||||||
</div>
|
</div>
|
||||||
</AppContext.Provider>
|
</AppContext.Provider>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user