26
src/components/Login/index.tsx
Normal file
26
src/components/Login/index.tsx
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import PlexLoginButton from '../PlexLoginButton';
|
||||||
|
|
||||||
|
const Login: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<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
|
||||||
|
</div>
|
||||||
|
<div className="flex justify-center text-gray-900 text-sm pb-6 mb-2">
|
||||||
|
would like to sign in to your Plex account
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-center">
|
||||||
|
<PlexLoginButton
|
||||||
|
onAuthToken={(authToken) =>
|
||||||
|
console.log(`auth token is: ${authToken}`)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Login;
|
||||||
@@ -5,7 +5,10 @@ import Layout from '../components/Layout';
|
|||||||
|
|
||||||
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;
|
||||||
|
if (router.asPath === '/login') {
|
||||||
|
return <Component {...pageProps} />;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
|
|||||||
9
src/pages/login.tsx
Normal file
9
src/pages/login.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { NextPage } from 'next';
|
||||||
|
import Login from '../components/Login';
|
||||||
|
|
||||||
|
const LoginPage: NextPage = () => {
|
||||||
|
return <Login />;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LoginPage;
|
||||||
Reference in New Issue
Block a user