Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
YannanGao-gs committed Sep 7, 2022
1 parent c0d25fa commit 962d98a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion .changeset/proud-boxes-joke.md
@@ -1,4 +1,3 @@
---
'@finos/legend-application-query-bootstrap': patch
'@finos/legend-application-studio': patch
---
10 changes: 5 additions & 5 deletions packages/legend-application-query/src/components/QueryEditor.tsx
Expand Up @@ -214,13 +214,13 @@ const QueryLoader = observer(
const [selectedQueryID, setSelectedQueryID] = useState('');
const queryLoaderColumns = ['Name', 'Author', 'Version'];
const closeQueryImporter = (): void => {
editorStore.setIsQueryLoaderOpen(!editorStore.isQueryLoaderOpen);
editorStore.setIsQueryLoaderOpen(false);
};
const handleEnterQueryImporter = (): void =>
queryFinderRef.current?.focus();
const loadSelectedQuery = (): void => {
if (selectedQueryID) {
editorStore.setIsQueryLoaderOpen(!editorStore.isQueryLoaderOpen);
editorStore.setIsQueryLoaderOpen(false);
applicationStore.navigator.goTo(
generateExistingQueryEditorRoute(selectedQueryID),
);
Expand Down Expand Up @@ -408,8 +408,8 @@ const QueryLoader = observer(
const QueryEditorHeaderContent = observer(() => {
const editorStore = useQueryEditorStore();
const applicationStore = useLegendQueryApplicationStore();
const toogleQueryLoader = (): void => {
editorStore.setIsQueryLoaderOpen(!editorStore.isQueryLoaderOpen);
const openQueryLoader = (): void => {
editorStore.setIsQueryLoaderOpen(true);
flowResult(editorStore.loadQueries(''))
.then(() => editorStore.setIsLoadingQueryInProgress(false))
.catch(applicationStore.alertUnhandledError);
Expand Down Expand Up @@ -453,7 +453,7 @@ const QueryEditorHeaderContent = observer(() => {
<button
className="query-editor__header__action btn--dark"
tabIndex={-1}
onClick={toogleQueryLoader}
onClick={openQueryLoader}
>
<div className="query-editor__header__action__label">Load Query</div>
</button>
Expand Down

0 comments on commit 962d98a

Please sign in to comment.