1- import {
2- Box ,
3- Button ,
4- Flex ,
5- Paper ,
6- Stack ,
7- Text ,
8- ThemeIcon ,
9- Title ,
10- useMantineColorScheme ,
11- } from "@mantine/core" ;
1+ import { Button , Flex , Paper , Stack , Text , Title } from "@mantine/core" ;
122import { AuthProvider } from "@sweetr/graphql-types/frontend/graphql" ;
13- import {
14- IconBrandGithub ,
15- IconClock ,
16- IconFireExtinguisher ,
17- IconFlame ,
18- IconQuote ,
19- } from "@tabler/icons-react" ;
203import { useAuthProviderQuery } from "../../../api/auth.api" ;
214import { Logo } from "../../../components/logo" ;
22- import { IconDeployment } from "../../../providers/icon.provider" ;
23- import { useSearchParams } from "react-router" ;
24- import Particles from "./particles" ;
5+ import { Link , useSearchParams } from "react-router" ;
6+ import { Particles } from "../components/particles" ;
257import classes from "./page.module.css" ;
268
27- const ELITE_BENCHMARKS = [
28- {
29- icon : IconDeployment ,
30- metric : "Deployment Frequency" ,
31- benchmark : "On-demand, multiple deploys per day" ,
32- } ,
33- {
34- icon : IconClock ,
35- metric : "Lead Time for Changes" ,
36- benchmark : "Less than one hour from commit to production" ,
37- } ,
38- {
39- icon : IconFireExtinguisher ,
40- metric : "Time to Restore Service" ,
41- benchmark : "Less than one hour to recover from incidents" ,
42- } ,
43- {
44- icon : IconFlame ,
45- metric : "Change Failure Rate" ,
46- benchmark : "0–15% of changes cause failures" ,
47- } ,
48- ] ;
49-
509export const LoginPage = ( ) => {
5110 const [ searchParams ] = useSearchParams ( {
5211 redirectTo : "" ,
@@ -59,8 +18,6 @@ export const LoginPage = () => {
5918 } ,
6019 } ) ;
6120
62- const { colorScheme } = useMantineColorScheme ( ) ;
63-
6421 document . body . style . backgroundColor = "#141517" ;
6522
6623 return (
@@ -76,7 +33,6 @@ export const LoginPage = () => {
7633 radius = "lg"
7734 p = { 48 }
7835 maw = { 960 }
79- w = "100%"
8036 pos = "relative"
8137 style = { { zIndex : 1 } }
8238 >
@@ -89,29 +45,39 @@ export const LoginPage = () => {
8945 >
9046 < Logo size = { 96 } />
9147 < Stack gap = { 5 } align = "center" >
92- < Title order = { 3 } > Get started for free </ Title >
48+ < Title order = { 3 } > Sweetr </ Title >
9349 < Text size = "sm" c = "dimmed" >
94- No credit card required
50+ Login or signup with GitHub
9551 </ Text >
9652 </ Stack >
97- < Button
98- component = "a"
99- fullWidth
100- size = "md"
101- w = { 280 }
102- href = { data ?. authProvider . redirectUrl }
103- loading = { isLoading }
104- leftSection = { < IconBrandGithub size = { 16 } /> }
105- bg = "green.4"
106- loaderProps = { { color : "black" } }
107- c = "black"
108- >
109- Continue with GitHub
110- </ Button >
111- < Text size = "sm" c = "dimmed" ta = "center" maw = { 260 } lh = { 1.5 } >
112- Works for login and signup. New teams will be guided through
113- setup.
114- </ Text >
53+
54+ < Stack gap = { 10 } >
55+ < Button
56+ component = "a"
57+ fullWidth
58+ size = "md"
59+ w = { 280 }
60+ href = { data ?. authProvider . redirectUrl }
61+ loading = { isLoading }
62+ bg = "green.4"
63+ loaderProps = { { color : "black" } }
64+ c = "black"
65+ >
66+ Login with GitHub
67+ </ Button >
68+ < Button
69+ component = { Link }
70+ fullWidth
71+ size = "md"
72+ w = { 280 }
73+ to = "/sign-up"
74+ loaderProps = { { color : "black" } }
75+ variant = "default"
76+ >
77+ Start 14-day free trial
78+ </ Button >
79+ </ Stack >
80+
11581 < Text
11682 component = "a"
11783 href = "/sandbox"
@@ -120,76 +86,9 @@ export const LoginPage = () => {
12086 td = "underline"
12187 style = { { textUnderlineOffset : 3 } }
12288 >
123- Explore the sandbox instead.
89+ Explore the sandbox instead
12490 </ Text >
12591 </ Stack >
126-
127- < Box
128- pl = { 60 }
129- visibleFrom = "md"
130- style = { {
131- borderLeft : "1px solid var(--mantine-color-dark-4)" ,
132- flex : 1 ,
133- minWidth : 0 ,
134- } }
135- >
136- < Title order = { 2 } lh = { 1.3 } >
137- Is your engineering team elite?
138- </ Title >
139- < Text size = "sm" c = "dimmed" mt = "xs" mb = { 36 } >
140- According to the DORA research program, elite teams hit all four
141- of these benchmarks. Most teams don't know where they stand.
142- </ Text >
143-
144- < Stack gap = "lg" >
145- { ELITE_BENCHMARKS . map ( ( item ) => (
146- < Flex key = { item . metric } gap = "md" align = "center" >
147- < ThemeIcon
148- variant = "default"
149- size = { 42 }
150- radius = "md"
151- style = { { flexShrink : 0 } }
152- >
153- < item . icon size = { 22 } />
154- </ ThemeIcon >
155- < Box style = { { minWidth : 0 } } >
156- < Text fw = { 600 } size = "md" >
157- { item . metric }
158- </ Text >
159- < Text size = "sm" c = "dimmed" >
160- { item . benchmark }
161- </ Text >
162- </ Box >
163- </ Flex >
164- ) ) }
165- </ Stack >
166-
167- < Text fw = { 500 } size = "sm" mt = { 36 } >
168- Sweetr tracks these metrics automatically from your Git data.
169- </ Text >
170-
171- < Flex align = "center" gap = { 6 } mt = { 36 } >
172- < IconQuote
173- size = { 14 }
174- color = "var(--mantine-color-dark-3)"
175- style = { { flexShrink : 0 } }
176- />
177- < Text
178- component = "a"
179- href = "https://dora.dev/research/2021/dora-report/2021-dora-accelerate-state-of-devops-report.pdf"
180- target = "_blank"
181- rel = "noopener noreferrer"
182- size = "xs"
183- c = "dimmed"
184- fs = "italic"
185- td = "underline"
186- style = { { textUnderlineOffset : 3 } }
187- >
188- Source: 2021 Accelerate State of DevOps Report (DORA / Google
189- Cloud)
190- </ Text >
191- </ Flex >
192- </ Box >
19392 </ Flex >
19493 </ Paper >
19594 </ Flex >
0 commit comments