Skip to content

Commit 22a9460

Browse files
author
sw-yx
committed
use providers
1 parent dbfe2f8 commit 22a9460

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

src/components/login.tsx

+1-9
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export function Login() {
4141
<label>
4242
<VisuallyHidden>Enter your email</VisuallyHidden>
4343
<input
44-
id="email"
4544
className="formControl"
4645
type="email"
4746
name="email"
@@ -55,14 +54,7 @@ export function Login() {
5554
<div className="formGroup" key="password">
5655
<label>
5756
<VisuallyHidden>Enter your password</VisuallyHidden>
58-
<input
59-
id="password"
60-
className="formControl"
61-
type="password"
62-
name="password"
63-
placeholder="Password"
64-
required={true}
65-
/>
57+
<input className="formControl" type="password" name="password" placeholder="Password" required={true} />
6658
<div className="inputFieldIcon inputFieldPassword" />
6759
</label>
6860
</div>

src/components/providers.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export function Providers({ setting }: { setting: Settings | null }) {
77
setting.external &&
88
Object.entries(setting.external).some(([k, v]) => ["github", "gitlab", "bitbucket", "google"].includes(k) && v)
99
if (!hasProviders) return null
10+
console.log({ setting })
1011
return (
1112
<div className="providersGroup">
1213
<hr className="hr" />
@@ -26,7 +27,7 @@ function ProviderButton({ setting, provider }: { setting: Settings | null; provi
2627
const ext = setting.external as Dict<{}>
2728
if (ext[provider.toLowerCase()]) return null
2829
const { loginProvider } = useIdentityContext()
29-
const click = () => loginProvider(provider.toLowerCase() as "github" | "gitlab" | "bitbucket" | "google" | "facebook")
30+
const click = () => loginProvider(provider.toLowerCase() as "github" | "gitlab" | "bitbucket" | "google")
3031
return (
3132
<button onClick={click} className={`provider${provider} btn btnProvider`}>
3233
Continue with {provider}

src/components/signup.tsx

+1-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export function Signup() {
4949
<label>
5050
<VisuallyHidden>Enter your email</VisuallyHidden>
5151
<input
52-
id="email"
5352
className="formControl"
5453
type="email"
5554
name="email"
@@ -63,14 +62,7 @@ export function Signup() {
6362
<div className="formGroup" key="password">
6463
<label>
6564
<VisuallyHidden>Enter your password</VisuallyHidden>
66-
<input
67-
id="password"
68-
className="formControl"
69-
type="password"
70-
name="password"
71-
placeholder="Password"
72-
required={true}
73-
/>
65+
<input className="formControl" type="password" name="password" placeholder="Password" required={true} />
7466
<div className="inputFieldIcon inputFieldPassword" />
7567
</label>
7668
</div>

0 commit comments

Comments
 (0)