AuthLayout: use logo from soapboxConfig
This commit is contained in:
parent
440309b7dd
commit
564524bfcc
|
@ -1,8 +1,10 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link, Redirect, Route, Switch } from 'react-router-dom';
|
import { Link, Redirect, Route, Switch } from 'react-router-dom';
|
||||||
|
|
||||||
|
import SvgIcon from 'soapbox/components/ui/icon/svg-icon';
|
||||||
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
|
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
|
||||||
import { NotificationsContainer } from 'soapbox/features/ui/util/async-components';
|
import { NotificationsContainer } from 'soapbox/features/ui/util/async-components';
|
||||||
|
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
||||||
|
|
||||||
import { Card, CardBody } from '../../components/ui';
|
import { Card, CardBody } from '../../components/ui';
|
||||||
import LoginPage from '../auth_login/components/login_page';
|
import LoginPage from '../auth_login/components/login_page';
|
||||||
|
@ -12,14 +14,26 @@ import PasswordResetConfirm from '../auth_login/components/password_reset_confir
|
||||||
import Verification from '../verification';
|
import Verification from '../verification';
|
||||||
import EmailPassthru from '../verification/email_passthru';
|
import EmailPassthru from '../verification/email_passthru';
|
||||||
|
|
||||||
const AuthLayout = () => (
|
const AuthLayout = () => {
|
||||||
|
const { logo } = useSoapboxConfig();
|
||||||
|
const siteTitle = useAppSelector(state => state.instance.title);
|
||||||
|
|
||||||
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className='fixed h-screen w-full bg-gradient-to-tr from-primary-50 via-white to-cyan-50' />
|
<div className='fixed h-screen w-full bg-gradient-to-tr from-primary-50 via-white to-cyan-50' />
|
||||||
|
|
||||||
<main className='relative flex flex-col h-screen'>
|
<main className='relative flex flex-col h-screen'>
|
||||||
<header className='pt-10 flex justify-center relative'>
|
<header className='pt-10 flex justify-center relative'>
|
||||||
<Link to='/' className='cursor-pointer'>
|
<Link to='/' className='cursor-pointer'>
|
||||||
<img src='/instance/images/truth-logo.svg' alt='Logo' className='h-7' />
|
{logo ? (
|
||||||
|
<img src={logo} alt={siteTitle} className='h-7' />
|
||||||
|
) : (
|
||||||
|
<SvgIcon
|
||||||
|
className='w-7 h-7'
|
||||||
|
alt={siteTitle}
|
||||||
|
src={require('@tabler/icons/icons/home.svg')}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
@ -50,5 +64,6 @@ const AuthLayout = () => (
|
||||||
</BundleContainer>
|
</BundleContainer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default AuthLayout;
|
export default AuthLayout;
|
||||||
|
|
|
@ -24,7 +24,7 @@ const Navbar = () => {
|
||||||
const singleUserMode = soapboxConfig.get('singleUserMode');
|
const singleUserMode = soapboxConfig.get('singleUserMode');
|
||||||
|
|
||||||
// In demo mode, use the Soapbox logo
|
// In demo mode, use the Soapbox logo
|
||||||
const logo = settings.get('demo') ? require('images/soapbox-logo.svg') : soapboxConfig.get('logo');
|
const logo = settings.get('demo') ? require('images/soapbox-logo.svg') : soapboxConfig.logo;
|
||||||
|
|
||||||
const onOpenSidebar = () => dispatch(openSidebar());
|
const onOpenSidebar = () => dispatch(openSidebar());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue