fix: make dialog context warn on development environment

This commit is contained in:
p-sw 2024-05-24 19:23:22 +09:00
parent 541292d8cc
commit 7ae5f7fd6d

View File

@ -23,7 +23,7 @@ const DialogContext = React.createContext<
>([ >([
initialDialogContext, initialDialogContext,
() => { () => {
if (process.env.NODE_ENV && process.env.NODE_ENV !== "development") { if (process.env.NODE_ENV && process.env.NODE_ENV === "development") {
console.warn( console.warn(
"It seems like you're using DialogContext outside of a provider." "It seems like you're using DialogContext outside of a provider."
); );