aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/list
diff options
context:
space:
mode:
authorCláudio <claudio.engdist@gmail.com>2021-02-08 22:58:15 -0300
committerCláudio <claudio.engdist@gmail.com>2021-02-08 22:58:15 -0300
commit7829db8850643b6ad2b36f8747d01f66df9024d8 (patch)
tree1546feb8ec1342c5d7250dd1a84ade4d08da3427 /webui/src/pages/list
parente47052bd3a02ff6e392c82e3ed3695cf5cf1fa2b (diff)
downloadgit-bug-7829db8850643b6ad2b36f8747d01f66df9024d8.tar.gz
Commit for #543
- To test I forced Ifloggedin always return null. - Layout is ok even when edition components are hidden.
Diffstat (limited to 'webui/src/pages/list')
-rw-r--r--webui/src/pages/list/ListQuery.tsx16
1 files changed, 13 insertions, 3 deletions
diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx
index 424ffac0..87c21e3c 100644
--- a/webui/src/pages/list/ListQuery.tsx
+++ b/webui/src/pages/list/ListQuery.tsx
@@ -12,6 +12,8 @@ import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft';
import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight';
import Skeleton from '@material-ui/lab/Skeleton';
+import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn';
+
import FilterToolbar from './FilterToolbar';
import List from './List';
import { useListBugsQuery } from './ListQuery.generated';
@@ -310,9 +312,17 @@ function ListQuery() {
</button>
</form>
</div>
- <Button className={classes.greenButton} variant="contained" href="/new">
- New issue
- </Button>
+ <IfLoggedIn>
+ {() => (
+ <Button
+ className={classes.greenButton}
+ variant="contained"
+ href="/new"
+ >
+ New issue
+ </Button>
+ )}
+ </IfLoggedIn>
</header>
<FilterToolbar query={query} queryLocation={queryLocation} />
{content}