Skip to content

Commit

Permalink
🐛loading a spec from the history the output panel keeps the content o…
Browse files Browse the repository at this point in the history
…f previous analyses
  • Loading branch information
soaibsafi committed Jan 5, 2024
1 parent e5db0b2 commit f73305e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/Utils/DrawerComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@mui/material';

import { getHistoryByPage, searchUserHistory, getCodeById } from '../../api/playgroundApi';
import { set } from 'lodash';

/**
* Display a drawer with the user's history.
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/components/Utils/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ export default function Navbar({ setEditorValue, setLanguage }) {
const handleDrawerItemClick = (check, code) => {
setEditorValue(code);
setLanguage(Options.find(option => option.short === check));
// Clean the output area when a new item is loaded from the history.
// FIXME: Better approach would be to handle this using useState hook in the Output component.
//But limboole is setting the output from web-assembly. We need to handle this when we refactor the code for Alloy.
const info = document.getElementById("info");
info.innerText = "";
};


const openModal = () => setIsModalOpen(true);
const closeModal = () => setIsModalOpen(false);

Expand Down Expand Up @@ -205,7 +209,6 @@ export default function Navbar({ setEditorValue, setLanguage }) {
style={{ marginRight: '20px' }}
role='button'
/>

</MDBNavbar>

{/* Snackbar component */}
Expand Down

0 comments on commit f73305e

Please sign in to comment.