mirror of https://github.com/fantasticit/think.git
client: filter current organization
This commit is contained in:
parent
85a12fb03c
commit
f1a788fce1
|
@ -11,6 +11,7 @@ import styles from './index.module.scss';
|
||||||
const { Text, Paragraph } = Typography;
|
const { Text, Paragraph } = Typography;
|
||||||
|
|
||||||
export const UserOrganizationsSwitcher = () => {
|
export const UserOrganizationsSwitcher = () => {
|
||||||
|
const { organizationId } = useRouterQuery<{ organizationId: string }>();
|
||||||
const {
|
const {
|
||||||
data: userOrganizations,
|
data: userOrganizations,
|
||||||
loading: userOrganizationsLoading,
|
loading: userOrganizationsLoading,
|
||||||
|
@ -29,7 +30,9 @@ export const UserOrganizationsSwitcher = () => {
|
||||||
<Dropdown.Menu>
|
<Dropdown.Menu>
|
||||||
{userOrganizations.length ? (
|
{userOrganizations.length ? (
|
||||||
<>
|
<>
|
||||||
{userOrganizations.map((org) => {
|
{userOrganizations
|
||||||
|
.filter((org) => org.id !== organizationId)
|
||||||
|
.map((org) => {
|
||||||
return (
|
return (
|
||||||
<Dropdown.Item key={org.id} style={{ padding: 0 }}>
|
<Dropdown.Item key={org.id} style={{ padding: 0 }}>
|
||||||
<Link
|
<Link
|
||||||
|
|
Loading…
Reference in New Issue