mirror of
https://github.com/sct/overseerr.git
synced 2025-09-28 21:14:27 +02:00
feat(login route conditional): on login route, do not display layout
This commit is contained in:
@@ -3,7 +3,7 @@ import PlexLoginButton from '../PlexLoginButton';
|
||||
|
||||
const Login: React.FC = () => {
|
||||
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">
|
||||
<div className="flex justify-center text-gray-900 font-bold text-xl mb-2">
|
||||
Overseerr
|
||||
|
@@ -2,15 +2,20 @@ import React from 'react';
|
||||
import '../styles/globals.css';
|
||||
import App from 'next/app';
|
||||
import Layout from '../components/Layout';
|
||||
import LoginPage from './login';
|
||||
|
||||
class CoreApp extends App {
|
||||
public render(): JSX.Element {
|
||||
const { Component, pageProps } = this.props;
|
||||
return (
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
</Layout>
|
||||
);
|
||||
const { Component, pageProps, router } = this.props;
|
||||
if (router.asPath == '/login') {
|
||||
return <LoginPage />;
|
||||
} else {
|
||||
return (
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,11 +3,7 @@ import { NextPage } from 'next';
|
||||
import Login from '../components/Login';
|
||||
|
||||
const LoginPage: NextPage = () => {
|
||||
return (
|
||||
<div className="w-full">
|
||||
<Login />
|
||||
</div>
|
||||
);
|
||||
return <Login />;
|
||||
};
|
||||
|
||||
export default LoginPage;
|
||||
|
Reference in New Issue
Block a user