mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-02-28 03:42:50 +01: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
@ -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 New Issue
Block a user