mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-21 20:44:18 +00:00
🔧 Improve login page
This commit is contained in:
parent
760eb3009d
commit
1a64137fa3
2 changed files with 13 additions and 0 deletions
|
@ -14,6 +14,7 @@ export default {
|
|||
it: {
|
||||
appName: "N.E.S.T.",
|
||||
appFullName: "Noi Estraiamo Statistiche Tweet",
|
||||
welcomeToNest: "Benvenuto a N.E.S.T.!", // TODO: Tradurre
|
||||
|
||||
server: "Scegli un server",
|
||||
baseURL: "Base URL",
|
||||
|
|
|
@ -5,18 +5,30 @@ import BoxSetServer from "../components/interactive/BoxSetServer"
|
|||
import BoxLogin from "../components/interactive/BoxLogin"
|
||||
import ContextUser from "../contexts/ContextUser"
|
||||
import { Redirect } from "react-router"
|
||||
import BoxHeader from "../components/base/BoxHeader"
|
||||
import useStrings from "../hooks/useStrings"
|
||||
import BoxFull from "../components/base/BoxFull"
|
||||
import SelectLanguage from "../components/interactive/SelectLanguage"
|
||||
|
||||
|
||||
export default function PageLogin({ className, ...props }) {
|
||||
const {user} = useContext(ContextUser)
|
||||
const strings = useStrings()
|
||||
|
||||
if(user) {
|
||||
return <Redirect to={"/repositories"}/>
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classNames(Style.PageLogin, className)} {...props}>
|
||||
<BoxHeader>
|
||||
{strings.welcomeToNest}
|
||||
</BoxHeader>
|
||||
<BoxSetServer/>
|
||||
<BoxLogin/>
|
||||
<BoxFull header={strings.changeLang}>
|
||||
<SelectLanguage/>
|
||||
</BoxFull>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue