Skip to content

Commit c79d0f5

Browse files
committed
fix: switch to warn level for hook errors
1 parent c057a19 commit c79d0f5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/react/src/hooks/useFlow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function useFlow(
1818
} {
1919
const context = useContext(FrigadeContext)
2020
if (!context || !context.frigade) {
21-
logOnce(`useFlow('${flowId}') must be used in a child of the Frigade Provider`, 'error')
21+
logOnce(`useFlow('${flowId}') must be used in a child of the Frigade Provider`, 'warn')
2222
}
2323
const { frigade, variables } = context ?? {}
2424
const [, setForceRender] = useState<boolean>(false)

packages/react/src/hooks/useFrigade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { logOnce } from '../shared/log'
66
export function useFrigade() {
77
const context = useContext(FrigadeContext)
88
if (!context || !context.frigade) {
9-
logOnce('useFrigade() must be used in a child of the Frigade Provider', 'error')
9+
logOnce('useFrigade() must be used in a child of the Frigade Provider', 'warn')
1010
}
1111

1212
const { frigade } = context

packages/react/src/hooks/useGroup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { logOnce } from '../shared/log'
66
export function useGroup() {
77
const context = useContext(FrigadeContext)
88
if (!context || !context.frigade) {
9-
logOnce('useGroup() must be used in a child of the Frigade Provider', 'error')
9+
logOnce('useGroup() must be used in a child of the Frigade Provider', 'warn')
1010
}
1111
const { frigade } = context ?? {}
1212

packages/react/src/hooks/useUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { logOnce } from '../shared/log'
66
export function useUser() {
77
const context = useContext(FrigadeContext)
88
if (!context || !context.frigade) {
9-
logOnce('useUser() must be used in a child of the Frigade Provider', 'error')
9+
logOnce('useUser() must be used in a child of the Frigade Provider', 'warn')
1010
}
1111
const { userId, frigade } = context ?? {}
1212

0 commit comments

Comments
 (0)