fix: switch space bug (#692)
This commit is contained in:
parent
85d18b8cc8
commit
f8b93ce93f
1 changed files with 3 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ interface SwitchSpaceProps {
|
||||||
|
|
||||||
export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const [opened, { close, open }] = useDisclosure(false);
|
||||||
|
|
||||||
const handleSelect = (value: string) => {
|
const handleSelect = (value: string) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
@ -27,6 +28,7 @@ export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
||||||
position="bottom"
|
position="bottom"
|
||||||
withArrow
|
withArrow
|
||||||
shadow="md"
|
shadow="md"
|
||||||
|
opened={opened}
|
||||||
>
|
>
|
||||||
<Popover.Target>
|
<Popover.Target>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -35,6 +37,7 @@ export function SwitchSpace({ spaceName, spaceSlug }: SwitchSpaceProps) {
|
||||||
justify="space-between"
|
justify="space-between"
|
||||||
rightSection={<IconChevronDown size={18} />}
|
rightSection={<IconChevronDown size={18} />}
|
||||||
color="gray"
|
color="gray"
|
||||||
|
onClick={open}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
size={20}
|
size={20}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue