Skip to content

Commit 5950806

Browse files
feat(web): hide security notice in askgithub sign-up modal (#930)
When EXPERIMENT_ASK_GH_ENABLED is true, the sign-up modal should not display the security notice. This is achieved by adding a hideSecurityNotice prop to AuthMethodSelector and using it in the askgh LoginModal. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
1 parent b4d7721 commit 5950806

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/web/src/app/[domain]/askgh/[owner]/[repo]/components/loginModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const LoginModal = ({
3737
providers={providers}
3838
callbackUrl={callbackUrl}
3939
context="login"
40-
securityNoticeClosable={true}
40+
hideSecurityNotice={true}
4141
/>
4242
</div>
4343
</DialogContent>

packages/web/src/app/components/authMethodSelector.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ interface AuthMethodSelectorProps {
1717
context: "login" | "signup";
1818
onProviderClick?: (providerId: string) => void;
1919
securityNoticeClosable?: boolean;
20+
hideSecurityNotice?: boolean;
2021
}
2122

2223
export const AuthMethodSelector = ({
2324
providers,
2425
callbackUrl,
2526
context,
2627
onProviderClick,
27-
securityNoticeClosable = false
28+
securityNoticeClosable = false,
29+
hideSecurityNotice = false
2830
}: AuthMethodSelectorProps) => {
2931
const onSignInWithOauth = useCallback((provider: string) => {
3032
// Call the optional analytics callback first
@@ -56,7 +58,7 @@ export const AuthMethodSelector = ({
5658

5759
return (
5860
<>
59-
<AuthSecurityNotice closable={securityNoticeClosable} />
61+
{!hideSecurityNotice && <AuthSecurityNotice closable={securityNoticeClosable} />}
6062
<DividerSet
6163
elements={[
6264
...(oauthProviders.length > 0 ? [

0 commit comments

Comments
 (0)