mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 22:25:24 +00:00
fix: stop connection screens crashing outside the connection log provider
This commit is contained in:
1 parent
0bef8b99b4
commit
a15372a224
3 files changed
+60
-5
No files matched your search
@@ -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