Skip to content
Snippets Groups Projects
Commit e198fd8b authored by Christopher Willis-Ford's avatar Christopher Willis-Ford
Browse files

Show/hide extension button based on URL query

To show the "Add Extension" button, you must now add `?extensions` to
the URL used to load the GUI.
parent 98d78fbc
No related branches found
No related tags found
No related merge requests found
...@@ -159,3 +159,7 @@ ...@@ -159,3 +159,7 @@
border: 1px solid lightgray; border: 1px solid lightgray;
background: white; background: white;
} }
.hidden {
display: none;
}
...@@ -47,6 +47,9 @@ const GUIComponent = props => { ...@@ -47,6 +47,9 @@ const GUIComponent = props => {
); );
} }
const enableExtensions = window.location.search.includes('extensions');
const extensionButtonClasses = `${styles.extensionButton} ${enableExtensions ? '' : styles.hidden}`;
const tabClassNames = { const tabClassNames = {
tabs: styles.tabs, tabs: styles.tabs,
tab: classNames(tabStyles.reactTabsTab, styles.tab), tab: classNames(tabStyles.reactTabsTab, styles.tab),
...@@ -94,7 +97,7 @@ const GUIComponent = props => { ...@@ -94,7 +97,7 @@ const GUIComponent = props => {
/> />
</Box> </Box>
<IconButton <IconButton
className={styles.extensionButton} className={extensionButtonClasses}
img={addExtensionIcon} img={addExtensionIcon}
title={addExtensionMessage} title={addExtensionMessage}
onClick={onAddExtensionClick} onClick={onAddExtensionClick}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment