formated project with prettier
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
import { NextPage } from 'next';
|
||||
import { ReactNode } from 'react';
|
||||
import { NextPage } from "next";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
const AuthLayout: NextPage<
|
||||
Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>
|
||||
Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>
|
||||
> = ({ children }) => (
|
||||
<div
|
||||
className="hero min-h-screen"
|
||||
style={{
|
||||
backgroundImage:
|
||||
'url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)',
|
||||
}}
|
||||
>
|
||||
<div className="hero-overlay bg-opacity-60"></div>
|
||||
<div className="hero-content text-neutral-content text-center ">
|
||||
<div className="max-w-lg">
|
||||
<div className="card bg-base-100 w-full min-w-[500px] shadow-2xl max-md:min-w-[400px]">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="hero min-h-screen"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)",
|
||||
}}
|
||||
>
|
||||
<div className="hero-overlay bg-opacity-60"></div>
|
||||
<div className="hero-content text-neutral-content text-center ">
|
||||
<div className="max-w-lg">
|
||||
<div className="card bg-base-100 w-full min-w-[500px] shadow-2xl max-md:min-w-[400px]">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
export default AuthLayout;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Login } from './_components/Login';
|
||||
import { Login } from "./_components/Login";
|
||||
|
||||
export default async () => {
|
||||
return (
|
||||
<>
|
||||
<Login />
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<Login />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
'use client';
|
||||
import { signOut } from 'next-auth/react';
|
||||
import { useEffect } from 'react';
|
||||
"use client";
|
||||
import { signOut } from "next-auth/react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default () => {
|
||||
useEffect(() => {
|
||||
signOut({
|
||||
callbackUrl: '/login',
|
||||
});
|
||||
}, []);
|
||||
return (
|
||||
<div className="card-body">
|
||||
<h1 className="text-5xl">logging out...</h1>
|
||||
</div>
|
||||
);
|
||||
useEffect(() => {
|
||||
signOut({
|
||||
callbackUrl: "/login",
|
||||
});
|
||||
}, []);
|
||||
return (
|
||||
<div className="card-body">
|
||||
<h1 className="text-5xl">logging out...</h1>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import { Authorize } from './_components/Authorize';
|
||||
import { Authorize } from "./_components/Authorize";
|
||||
|
||||
export const services = [
|
||||
{
|
||||
id: '123456',
|
||||
service: 'dispatch',
|
||||
name: 'Leitstellendisposition',
|
||||
approvedUrls: ['http://localhost:3001'],
|
||||
},
|
||||
{
|
||||
id: "123456",
|
||||
service: "dispatch",
|
||||
name: "Leitstellendisposition",
|
||||
approvedUrls: ["http://localhost:3001"],
|
||||
},
|
||||
];
|
||||
export type Service = (typeof services)[number];
|
||||
|
||||
export default async ({
|
||||
searchParams,
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
|
||||
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
|
||||
}) => {
|
||||
const { service: serviceId } = await searchParams;
|
||||
const service = services.find((service) => service.id === serviceId);
|
||||
const { service: serviceId } = await searchParams;
|
||||
const service = services.find((service) => service.id === serviceId);
|
||||
|
||||
if (!service) {
|
||||
return <div>Service not found</div>;
|
||||
}
|
||||
if (!service) {
|
||||
return <div>Service not found</div>;
|
||||
}
|
||||
|
||||
return <Authorize service={service} />;
|
||||
return <Authorize service={service} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user