import { useParams } from "react-router-dom";

import { Matrix } from "../../../common/components/Matrix/Matrix";

export const MemberListPage = () => {
	const { organizationId } = useParams();

	const columns = [
		{
			name: "username",
			title: "User",
		},
	];

	return (
		<Matrix
			title="Members"
			columns={columns}
			baseUrl="/api/members"
			filters={{
				organizationId,
			}}
			notificationMethodPrefix="MEMBERS"
			getModelTitle={(x) => x.username}
			canCreate={true}
			canRemove={true}
			canView={true}
		/>
	);
};
