mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-23 16:58:30 +00:00
fix: dismiss the error when changing path
The error overlay used to persist even after the path was changed. This changes this behavior so it is automatically dismissed when changing the path.
This commit is contained in:
parent
b0e3b6d777
commit
27c01cfb28
1 changed files with 2 additions and 1 deletions
|
|
@ -1069,12 +1069,13 @@ function PreviewView({
|
|||
model: PreviewModel;
|
||||
}) {
|
||||
const connStatus = useAtomValue(model.connStatus);
|
||||
const filePath = useAtomValue(model.metaFilePath);
|
||||
const [errorMsg, setErrorMsg] = useAtom(model.errorMsgAtom);
|
||||
const connection = useAtomValue(model.connectionImmediate);
|
||||
|
||||
useEffect(() => {
|
||||
setErrorMsg(null);
|
||||
}, [connection]);
|
||||
}, [connection, filePath]);
|
||||
|
||||
if (connStatus?.status != "connected") {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue