Skip to content

Commit

Permalink
refactor: more consistency in manager/reviewer project list
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Jul 30, 2024
1 parent 3c68ace commit 162448c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
22 changes: 20 additions & 2 deletions libs/web/project/feature/src/lib/manager-project-list-feature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ export function ManagerProjectListFeature({ communityId }: { communityId?: strin
communityId,
},
)
const searchField = (
<CoreUiSearchField
miw={300}
maw={500}
size="md"
placeholder="Search by project or community"
setSearch={setSearch}
/>
)

const page = (
<>
Expand All @@ -48,7 +57,7 @@ export function ManagerProjectListFeature({ communityId }: { communityId?: strin
/>
</Group>
<Group>
<CoreUiSearchField placeholder="Search project" setSearch={setSearch} />
{communityId ? searchField : null}
<CoreUiDebugModal data={items} />
<Button
radius="xl"
Expand Down Expand Up @@ -100,7 +109,16 @@ export function ManagerProjectListFeature({ communityId }: { communityId?: strin
return communityId ? (
page
) : (
<UiPage title="Manage Projects" leftAction={<IconChairDirector size={28} />}>
<UiPage
title="Manage Projects"
leftAction={<IconChairDirector size={28} />}
rightAction={
<Group>
<CoreUiDebugModal data={items} />
{searchField}
</Group>
}
>
{page}
</UiPage>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ export default function ReviewerProjectListFeature() {
>
<Group justify="space-between">
<Group>
<Switch
label="Show my projects only"
checked={mineOnly}
onChange={(e) => setMineOnly(e.currentTarget.checked)}
/>
<CoreUiCustomSelect
label="State"
smIcon={<IconFilter />}
Expand All @@ -55,6 +50,11 @@ export default function ReviewerProjectListFeature() {
data={projectOrderByOptions}
/>
</Group>
<Switch
label="Show my projects only"
checked={mineOnly}
onChange={(e) => setMineOnly(e.currentTarget.checked)}
/>
</Group>

{query.isLoading ? (
Expand Down

0 comments on commit 162448c

Please sign in to comment.