-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force auth frontend #435
Force auth frontend #435
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -76,6 +78,18 @@ const ChatWindow = ({ | |||
} | |||
}); | |||
|
|||
const handleChangeWebSearch = (value: boolean) => { | |||
// Change this value when we can no longer support web search | |||
const WEB_SEARCH_ALLOWED = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be best to make this feature flag: eg NEXT_PUBLIC_FF_WEB_SEARCH_ENABLED
. That way we can toggle it just by changing an env var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah can change it in the future if we need. We shouldn't have this check for long I imagine
if (WEB_SEARCH_ALLOWED) { | ||
setIsWebSearchEnabled(value); | ||
} else { | ||
openSorryDialog?.(); | ||
setIsWebSearchEnabled(false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (WEB_SEARCH_ALLOWED) { | |
setIsWebSearchEnabled(value); | |
} else { | |
openSorryDialog?.(); | |
setIsWebSearchEnabled(false); | |
} | |
if (!WEB_SEARCH_ALLOWED) openSorryDialog?.(); | |
setIsWebSearchEnabled(WEB_SEARCH_ALLOWED); |
return ( | ||
<Dialog header="Sorry! 😭" isShown={show} close={close}> | ||
<p>Due to costs, we've had to momentarily disable web search 🌐</p> | ||
<br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Ideally instead of
i think we can just use flex gap spacing. eg: flex flex-col gap-2
Co-authored-by: Adam Watkins <hello@awtkns.com>
Note this is all frontend only