mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Fix user hooks
This commit is contained in:
parent
9b388d9168
commit
07e03a9b9d
2
LICENSE
2
LICENSE
@ -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).
|
||||
|
||||
@ -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 ? {
|
||||
|
||||
@ -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 ? {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user