Skip to content

Commit

Permalink
chore: removed filter button from resource action
Browse files Browse the repository at this point in the history
  • Loading branch information
ariansobczak-rst committed Apr 19, 2023
1 parent 7111d8b commit 2908d5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const ActionHeader: React.FC<ActionHeaderProps> = (props) => {
<Box display={['block', cssIsRootFlex ? 'flex' : 'block']}>
<Box mt={cssHeaderMT} flexGrow={1} px={['default', 0]}>
<CssHComponent mb="lg">
{action.showInDrawer ? <StyledBackButton showInDrawer={action.showInDrawer} /> : ''}
{action.showInDrawer && <StyledBackButton showInDrawer={action.showInDrawer} /> }
{title}
{tag ? (
<Badge variant="default" outline ml="default">
Expand Down
8 changes: 6 additions & 2 deletions src/frontend/components/routes/resource-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const ResourceAction: React.FC<Props> = (props) => {
const params = useParams<ResourceActionParams>()
const { resources } = props
const { resourceId, actionName } = params
const { toggleFilter } = useFilterDrawer()
const [tag, setTag] = useState('')

const resource = resources.find((r) => r.id === resourceId)
Expand All @@ -48,7 +47,12 @@ const ResourceAction: React.FC<Props> = (props) => {
return (
<Wrapper width={action.containerWidth} showFilter={action.showFilter}>
<Box flex flexDirection="column">
<ActionHeader resource={resource} action={action} toggleFilter={toggleFilter} tag={tag} />
<ActionHeader
resource={resource}
action={action}
toggleFilter={action.showFilter}
tag={tag}
/>
<BaseActionComponent action={action} resource={resource} setTag={setTag} />
</Box>
{action.showFilter ? <FilterDrawer resource={resource} /> : ''}
Expand Down

0 comments on commit 2908d5c

Please sign in to comment.