2024-05-14 08:56:54 +00:00
|
|
|
"use client";
|
|
|
|
|
2024-06-04 08:08:47 +00:00
|
|
|
import { observer } from "mobx-react-lite";
|
2023-09-04 11:25:43 +00:00
|
|
|
import Image from "next/image";
|
2024-06-04 08:08:47 +00:00
|
|
|
import { useTheme } from "next-themes";
|
2024-05-17 11:24:58 +00:00
|
|
|
// components
|
|
|
|
import { UserAvatar } from "@/components/issues/navbar/user-avatar";
|
2024-05-08 17:31:20 +00:00
|
|
|
// hooks
|
|
|
|
import { useUser } from "@/hooks/store";
|
2023-09-04 11:25:43 +00:00
|
|
|
// assets
|
2024-06-04 08:08:47 +00:00
|
|
|
import PlaneBlackLogo from "@/public/plane-logos/black-horizontal-with-blue-logo.png";
|
|
|
|
import PlaneWhiteLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png";
|
2024-05-16 11:47:04 +00:00
|
|
|
import UserLoggedInImage from "@/public/user-logged-in.svg";
|
2023-09-04 11:25:43 +00:00
|
|
|
|
2024-06-04 08:08:47 +00:00
|
|
|
export const UserLoggedIn = observer(() => {
|
|
|
|
// store hooks
|
2024-05-08 17:31:20 +00:00
|
|
|
const { data: user } = useUser();
|
2024-06-04 08:08:47 +00:00
|
|
|
// next-themes
|
|
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
|
|
|
|
const logo = resolvedTheme === "dark" ? PlaneWhiteLogo : PlaneBlackLogo;
|
2023-09-04 11:25:43 +00:00
|
|
|
|
|
|
|
if (!user) return null;
|
2024-05-15 22:33:43 +00:00
|
|
|
|
2023-09-04 11:25:43 +00:00
|
|
|
return (
|
2024-06-04 08:08:47 +00:00
|
|
|
<div className="flex flex-col h-screen w-screen">
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="relative flex w-full items-center justify-between gap-4 border-b border-custom-border-200 px-6 py-5">
|
2023-09-04 11:25:43 +00:00
|
|
|
<div>
|
2024-06-04 08:08:47 +00:00
|
|
|
<Image src={logo} alt="Plane logo" />
|
2023-09-04 11:25:43 +00:00
|
|
|
</div>
|
2024-05-17 11:24:58 +00:00
|
|
|
<UserAvatar />
|
2023-09-04 11:25:43 +00:00
|
|
|
</div>
|
|
|
|
|
2024-06-04 08:08:47 +00:00
|
|
|
<div className="size-full grid place-items-center p-6">
|
2023-09-04 11:25:43 +00:00
|
|
|
<div className="text-center">
|
2024-06-04 08:08:47 +00:00
|
|
|
<div className="mx-auto size-52 grid place-items-center rounded-full bg-custom-background-80">
|
|
|
|
<div className="size-32">
|
2023-09-04 11:25:43 +00:00
|
|
|
<Image src={UserLoggedInImage} alt="User already logged in" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-06-04 08:08:47 +00:00
|
|
|
<h1 className="mt-12 text-3xl font-semibold">Logged in successfully!</h1>
|
2023-09-04 11:25:43 +00:00
|
|
|
<p className="mt-4">
|
|
|
|
You{"'"}ve successfully logged in. Please enter the appropriate project URL to view the issue board.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2024-06-04 08:08:47 +00:00
|
|
|
});
|