From 5a43cacb2a206cebec6bfff6c4f79db6b914a3cb Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Fri, 20 Sep 2024 11:49:12 -0400 Subject: [PATCH 1/2] ensure there are other sessions --- .../src/ui/components/UserButton/UserButtonPopover.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/clerk-js/src/ui/components/UserButton/UserButtonPopover.tsx b/packages/clerk-js/src/ui/components/UserButton/UserButtonPopover.tsx index 10b737e30b..ce5ce45d6b 100644 --- a/packages/clerk-js/src/ui/components/UserButton/UserButtonPopover.tsx +++ b/packages/clerk-js/src/ui/components/UserButton/UserButtonPopover.tsx @@ -66,7 +66,9 @@ export const UserButtonPopover = React.forwardRef - {!authConfig.singleSessionMode && } + {!authConfig.singleSessionMode && otherSessions.length > 0 && ( + + )} From 32558d6b47e29d1586e11562acd7e0f9e81191ca Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Fri, 20 Sep 2024 12:01:10 -0400 Subject: [PATCH 2/2] add changeset --- .changeset/violet-kangaroos-lay.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/violet-kangaroos-lay.md diff --git a/.changeset/violet-kangaroos-lay.md b/.changeset/violet-kangaroos-lay.md new file mode 100644 index 0000000000..834b0ceef0 --- /dev/null +++ b/.changeset/violet-kangaroos-lay.md @@ -0,0 +1,5 @@ +--- +"@clerk/clerk-js": patch +--- + +Only render the Sign out of all accounts action within `` when there are multiple sessions.