mirror of
https://github.com/sct/overseerr.git
synced 2025-10-01 16:04:27 +02:00
refactor(use component on login path conditional): use component on login path conditional
This commit is contained in:
@@ -2,13 +2,12 @@ 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, router } = this.props;
|
||||
if (router.asPath == '/login') {
|
||||
return <LoginPage {...pageProps} />;
|
||||
if (router.asPath === '/login') {
|
||||
return <Component {...pageProps} />;
|
||||
} else {
|
||||
return (
|
||||
<Layout>
|
||||
|
Reference in New Issue
Block a user