@@ -7,6 +7,8 @@ import LanguageSwitcher from '@/app/components/LanguageSwitcher';
import { useTranslations } from 'next-intl' ;
import VKLogin from '@/app/components/VKLogin' ;
import YandexAuthWithScript from '@/app/components/YandexLogin' ;
import { getHealt } from '@/app/actions/action' ;
import { Suspense } from 'react' ;
export const metadata : Metadata = {
title : 'Login' ,
@@ -15,57 +17,69 @@ export const metadata: Metadata = {
export default function Page() {
const t = useTranslations ( 'Login-register-form' ) ;
async function HealthData() {
const data = await getHealt ( ) ;
if ( ! data ) {
return < div > С е р в е р в р е м е н н о н е р а б о т а е т < / div >
} else {
return null
}
}
return (
< div className = { ` ${ styles [ 'login-container-wrapper' ] } ` } >
{ /* <div className={`${styles['login-container-language']}`}>
< Suspense fallback = { < div > Loading . . . < / div > } >
< HealthData / >
< div className = { ` ${ styles [ 'login-container-wrapper' ] } ` } >
{ /* <div className={`${styles['login-container-language']}`}>
<LanguageSwitcher />
</div> */ }
< div className = { ` ${ styles [ 'login-container' ] } ` } >
< div className = { ` ${ styles [ 'logo' ] } ` } >
< LogoIcon / >
< h1 > NO COPY < / h1 >
< p >
{ t ( 'copyright-protection' ) }
< / p >
< / div >
< LoginForm / >
< div className = "divider" >
< span >
{ t ( 'or-log-in-via' ) }
< / span >
< / div >
< div className = "mb-4" >
< VKLogin / >
< / div >
< div >
< YandexAuthWithScript / >
< / div >
< div className = { ` ${ styles [ 'register-link' ] } ` } >
< p > { t ( 'no-account' ) } ?
< Link href = "register" > { t ( 'register' ) } < / Link >
< / p >
< / div >
< div className = { ` ${ styles [ 'features' ] } ` } >
< div className = { ` ${ styles [ 'feature' ] } ` } >
< svg className = { ` ${ styles [ 'feature-icon' ] } ` } viewBox = "0 0 24 24" fill = "currentColor" >
< path d = "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" > < / path >
< / svg >
{ t ( 'protecting-watermark' ) }
< div className = { ` ${ styles [ 'login-container' ] } ` } >
< div className = { ` ${ styles [ 'logo' ] } ` } >
< LogoIcon / >
< h1 > NO COPY < / h1 >
< p >
{ t ( 'copyright-protection' ) }
< / p >
< / div >
< div className = { ` ${ styles [ 'feature' ] } ` } >
< svg className = { ` ${ styles [ 'feature-icon' ] } ` } viewBox = "0 0 24 24" fill = "currentColo r">
< path d = "M13 10V3L4 14h7v7l9-11h-7z" > < / path >
< / svg >
{ t ( 'monitoring-violations' ) }
< LoginForm / >
< div className = "divide r">
< span >
{ t ( 'or-log-in-via' ) }
< / span >
< / div >
< div className = { ` ${ styles [ 'feature' ] } ` } >
< svg className = { ` ${ styles [ 'feature-icon' ] } ` } viewBox = "0 0 24 24" fill = "currentColor" >
< path d = "M12 1L3 5v6c0 5.55 3.84 9.74 9 11 5.16-1.26 9-5.45 9-11V5l-9-4z" > < / path >
< / svg >
{ t ( 'safe-storage' ) }
< div className = "mb-4" >
< VKLogin / >
< / div >
< div >
< YandexAuthWithScript / >
< / div >
< div className = { ` ${ styles [ 'register-link' ] } ` } >
< p > { t ( 'no-account' ) } ?
< Link href = "register" > { t ( 'register' ) } < / Link >
< / p >
< / div >
< div className = { ` ${ styles [ 'features' ] } ` } >
< div className = { ` ${ styles [ 'feature' ] } ` } >
< svg className = { ` ${ styles [ 'feature-icon' ] } ` } viewBox = "0 0 24 24" fill = "currentColor" >
< path d = "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" > < / path >
< / svg >
{ t ( 'protecting-watermark' ) }
< / div >
< div className = { ` ${ styles [ 'feature' ] } ` } >
< svg className = { ` ${ styles [ 'feature-icon' ] } ` } viewBox = "0 0 24 24" fill = "currentColor" >
< path d = "M13 10V3L4 14h7v7l9-11h-7z" > < / path >
< / svg >
{ t ( 'monitoring-violations' ) }
< / div >
< div className = { ` ${ styles [ 'feature' ] } ` } >
< svg className = { ` ${ styles [ 'feature-icon' ] } ` } viewBox = "0 0 24 24" fill = "currentColor" >
< path d = "M12 1L3 5v6c0 5.55 3.84 9.74 9 11 5.16-1.26 9-5.45 9-11V5l-9-4z" > < / path >
< / svg >
{ t ( 'safe-storage' ) }
< / div >
< / div >
< / div >
< / div >
< / div >
< / Suspense >
) ;
}