Skip to content

Commit

Permalink
show site icon on login page
Browse files Browse the repository at this point in the history
  • Loading branch information
gpelouze committed Sep 14, 2023
1 parent e8f3f4f commit caf2391
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
13 changes: 12 additions & 1 deletion vre-panel/pages/auth/signin.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
import { getProviders, getSession, signIn } from "next-auth/react"
import getConfig from 'next/config'
import {useContext} from "react";
import {PaasConfigContext} from "../../context/PaasConfig";

const { publicRuntimeConfig } = getConfig()

export default function SignIn({ providers }: { providers: any }) {

const {paasConfig, paasConfigLoading} = useContext(PaasConfigContext)

return (
<div className="mx-auto flex flex-col items-center justify-center h-screen">
<img className="w-fit h-fit object-cover" src={`${publicRuntimeConfig.staticFolder}/LW_VLICVRE_logo.png`} />
<div className="flex flex-col justify-center rounded-md overflow-hidden shadow-lg bg-white p-10 mt-10 w-screen">
<img src={`${publicRuntimeConfig.staticFolder}/LW_ERIC_Logo.png`} className="w-36 self-center" alt="LifeWatch Logo" />
{paasConfigLoading || (
<img
src={paasConfig.site_icon}
alt="Site icon"
className="h-16 self-center"
/>
)}
<>
{Object.values(providers).map((provider: any) => (
<div className="self-center" key={provider.name}>
Expand Down
8 changes: 3 additions & 5 deletions vre-panel/templates/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ const Nav = () => {
<nav className="bg-white border-gray-200 px-2 sm:px-4 rounded dark:bg-gray-800">
<div className="container flex flex-wrap justify-between items-center mx-auto">
<Link href='/' className="flex items-center">
{
paasConfigLoading || (
{paasConfigLoading || (
<img
src={paasConfig.site_icon}
alt="Site Logo"
alt="Site icon"
className="mr-3 h-16"
/>
)
}
)}
</Link>
<div className="flex items-center md:order-2">
<div className="relative inline-block text-left">
Expand Down

0 comments on commit caf2391

Please sign in to comment.