feat(login route conditional): on login route, do not display layout

pull/8/head
Alexander Zoitos 4 years ago
parent 6e47be2fa8
commit 7d179ae3b4

@ -3,7 +3,7 @@ import PlexLoginButton from '../PlexLoginButton';
const Login: React.FC = () => { const Login: React.FC = () => {
return ( return (
<div className="w-full"> <div className="w-full pt-10">
<form className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"> <form className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
<div className="flex justify-center text-gray-900 font-bold text-xl mb-2"> <div className="flex justify-center text-gray-900 font-bold text-xl mb-2">
Overseerr Overseerr

@ -2,15 +2,20 @@ import React from 'react';
import '../styles/globals.css'; import '../styles/globals.css';
import App from 'next/app'; import App from 'next/app';
import Layout from '../components/Layout'; import Layout from '../components/Layout';
import LoginPage from './login';
class CoreApp extends App { class CoreApp extends App {
public render(): JSX.Element { public render(): JSX.Element {
const { Component, pageProps } = this.props; const { Component, pageProps, router } = this.props;
return ( if (router.asPath == '/login') {
<Layout> return <LoginPage />;
<Component {...pageProps} /> } else {
</Layout> return (
); <Layout>
<Component {...pageProps} />
</Layout>
);
}
} }
} }

@ -3,11 +3,7 @@ import { NextPage } from 'next';
import Login from '../components/Login'; import Login from '../components/Login';
const LoginPage: NextPage = () => { const LoginPage: NextPage = () => {
return ( return <Login />;
<div className="w-full">
<Login />
</div>
);
}; };
export default LoginPage; export default LoginPage;

Loading…
Cancel
Save