BugFix: PAge was exporting extra function
This commit is contained in:
@@ -4,7 +4,7 @@ import { Main } from '@/app/ui/Main';
|
||||
import { authConfig } from "@/app/lib/auth";
|
||||
import { SignInButton } from '../ui/SignInButton';
|
||||
|
||||
export type Provider = {
|
||||
type Provider = {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
@@ -15,7 +15,7 @@ export type Provider = {
|
||||
};
|
||||
};
|
||||
|
||||
export function getProviders(): Provider[] {
|
||||
function getProviders(): Provider[] {
|
||||
const providerKeys: (keyof Provider)[] = ["id", "name", "type", "style"];
|
||||
return authConfig.providers.map((provider) =>
|
||||
getKeyValuesFromObject<Provider>(provider, providerKeys)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { signIn } from "next-auth/react"
|
||||
import { Button } from "@/app/ui/button";
|
||||
import Image from "next/image";
|
||||
|
||||
const providerLogo = (provider: {id:string, name:string}) => {
|
||||
switch(provider.id) {
|
||||
@@ -16,7 +16,7 @@ const providerLogo = (provider: {id:string, name:string}) => {
|
||||
|
||||
export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({ provider }) =>
|
||||
<button className="btn btn-neutral" onClick={() => signIn(provider.id)}>
|
||||
<img loading="lazy" height="24" width="24" id="provider-logo-dark" src={providerLogo(provider)} />
|
||||
<Image alt="Provider Logo" loading="lazy" height="24" width="24" id="provider-logo-dark" src={providerLogo(provider)} />
|
||||
<span>Sign in with {provider.name}</span>
|
||||
</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user