Fix user hooks

This commit is contained in:
Konstantin Wohlwend 2025-06-22 19:32:52 -07:00
parent 9b388d9168
commit 07e03a9b9d
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
Stack is licensed per-package, and 100% open-source.
Client libraries and examples are licensed under an open-source MIT license. Server components are licensed under an open-source AGPLv3 license. Please refer to each package's `LICENSE` files for more information.
Generally speaking, client code and examples are licensed under an open-source MIT license, while server components are licensed under an open-source AGPLv3 license. Please refer to each package's `LICENSE` files for more information.
We also have enterprise licenses available, if you prefer; please contact [enterprise@stack-auth.com](mailto:enterprise@stack-auth.com).

View File

@ -54,7 +54,7 @@ function Fallback() {
function Inner(props: SelectedTeamSwitcherProps) {
const { t } = useTranslation();
const appFromHook = useStackApp();
const userFromHook = useUser({ or: props.mockUser ? 'return-null' : undefined });
const userFromHook = useUser();
// Use mock data if provided, otherwise use real data
const app = props.mockUser ? {

View File

@ -43,7 +43,7 @@ export function UserButton(props: UserButtonProps) {
}
function UserButtonInner(props: UserButtonProps) {
const userFromHook = useUser({ or: props.mockUser ? 'return-null' : 'redirect' });
const userFromHook = useUser();
// Use mock user if provided, otherwise use real user
const user = props.mockUser ? {