Skip to content

Commit

Permalink
Merge pull request #509 from IntersectMBO/feat/change-position-of-add…
Browse files Browse the repository at this point in the history
…-new-member-button

feat: Changed position of the AddNewMember Button
  • Loading branch information
MGukic authored Dec 18, 2024
2 parents bfcb735 + 9568f1f commit b32537b
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions frontend/src/components/organisms/UsersList/UsersList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { UsersListItem } from "./UsersListItem";
export function UsersList({
usersList,
paginationMeta,
error
error,
}: {
usersList: UserListItem[];
paginationMeta: PaginationMeta;
Expand All @@ -31,7 +31,7 @@ export function UsersList({
const { addErrorAlert } = useSnackbar();
const params: Record<string, string | null> = {
search: searchText || null,
sortBy: chosenSorting || null
sortBy: chosenSorting || null,
};
const { data, pagination, isLoading, loadMore } = usePagination(
usersList,
Expand All @@ -44,7 +44,7 @@ export function UsersList({
const { openModal } = useModal();
const addMember = () =>
openModal({
type: "addMember"
type: "addMember",
});

useEffect(() => {
Expand Down Expand Up @@ -73,14 +73,8 @@ export function UsersList({
alignItems={{ xxs: "left", md: "center" }}
gap={3}
>
<Typography variant="headline4">{t("title")}</Typography>
<Box
display="flex"
justifyContent={{ xxs: "left", md: "space-between" }}
alignItems="center"
gap={2}
flexWrap={"wrap"}
>
<Box display="flex" justifyContent="space-between" gap={3}>
<Typography variant="headline4">{t("title")}</Typography>
<PermissionChecker
permissions={userSession?.permissions}
requiredPermission="manage_cc_members"
Expand All @@ -94,11 +88,11 @@ export function UsersList({
{t("addNewMember")}
</Button>
</PermissionChecker>
<DataActionsContainer
setSearchText={setSearchText}
setChosenSorting={setChosenSorting}
/>
</Box>
<DataActionsContainer
setSearchText={setSearchText}
setChosenSorting={setChosenSorting}
/>
</Box>
{isEmpty(data) || error ? (
<NotFound
Expand Down

0 comments on commit b32537b

Please sign in to comment.