mirror of
https://github.com/YuzuZensai/Termix.git
synced 2026-11-12 11:42:15 +00:00
fix: stop connection screens crashing outside the connection log provider
This commit is contained in:
@@ -88,3 +88,9 @@ export function useConnectionLog() {
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
// Loading and error screens render outside any provider, so they get undefined
|
||||
// instead of a crash.
|
||||
export function useOptionalConnectionLog() {
|
||||
return useContext(ConnectionLogContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user