enabled i18n for all components
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { signIn } from "next-auth/react"
|
||||
import { useTranslations } from "next-intl";
|
||||
import Image from "next/image";
|
||||
|
||||
const providerLogo = (provider: {id:string, name:string}) => {
|
||||
@@ -14,10 +15,15 @@ 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, { callbackUrl:"https://rezije.app/" }) }>
|
||||
<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>
|
||||
export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({ provider }) => {
|
||||
|
||||
const t = useTranslations("login-page");
|
||||
|
||||
return(
|
||||
<button className="btn btn-neutral" onClick={() => signIn(provider.id, { callbackUrl:"https://rezije.app/" }) }>
|
||||
<Image alt="Provider Logo" loading="lazy" height="24" width="24" id="provider-logo-dark" src={providerLogo(provider)} />
|
||||
<span>
|
||||
{t("sign-in-button")} {provider.name}</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user