Skip to content

Commit e0acc7c

Browse files
committed
working github sign up button on setup page
1 parent 1360cd4 commit e0acc7c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

site/src/pages/SetupPage/SetupPageView.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import { SignInLayout } from "components/SignInLayout/SignInLayout";
1616
import { Stack } from "components/Stack/Stack";
1717
import { type FormikContextType, useFormik } from "formik";
1818
import type { FC } from "react";
19+
import Button from "@mui/material/Button";
20+
import GitHubIcon from "@mui/icons-material/GitHub";
1921
import { useEffect } from "react";
2022
import { docs } from "utils/docs";
2123
import {
@@ -34,6 +36,7 @@ export const Language = {
3436
emailRequired: "Please enter an email address.",
3537
passwordRequired: "Please enter a password.",
3638
create: "Create account",
39+
githubCreate: "Create account with GitHub",
3740
welcomeMessage: <>Welcome to Coder</>,
3841
firstNameLabel: "First name",
3942
lastNameLabel: "Last name",
@@ -81,6 +84,11 @@ const numberOfDevelopersOptions = [
8184
"2500+",
8285
];
8386

87+
const iconStyles = {
88+
width: 16,
89+
height: 16,
90+
};
91+
8492
export interface SetupPageViewProps {
8593
onSubmit: (firstUser: TypesGen.CreateFirstUserRequest) => void;
8694
error?: unknown;
@@ -140,6 +148,19 @@ export const SetupPageView: FC<SetupPageViewProps> = ({
140148
Let&lsquo;s create your first admin user account
141149
</div>
142150
</header>
151+
<div className="mb-8">
152+
<Button
153+
component="a"
154+
href={`/api/v2/users/oauth2/github/callback`}
155+
variant="contained"
156+
startIcon={<GitHubIcon css={iconStyles} />}
157+
fullWidth
158+
type="submit"
159+
size="xlarge"
160+
>
161+
{Language.githubCreate}
162+
</Button>
163+
</div>
143164
<VerticalForm onSubmit={form.handleSubmit}>
144165
<FormFields>
145166
<TextField

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy