mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
05de4d83f3
* chore: header refactor. * fix: core imports * chore: refactor profile activity header and fix all other header imports. * fix: import fixes * chore: header refactor. * fix: app dir header reimplementation * fix: removing parllel headers * fix: adding route groups to handle pages * fix: disabling sentry for temp * chore: update default exports in layouts & headers for consistency. * fix: bugfixes * fix: build errors --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
"use client";
|
|
|
|
import useSWR from "swr";
|
|
// layouts
|
|
import { PageHead, SidebarHamburgerToggle } from "@/components/core";
|
|
import { EmailNotificationForm } from "@/components/profile/notification";
|
|
import { EmailSettingsLoader } from "@/components/ui";
|
|
// ui
|
|
// components
|
|
// services
|
|
import { UserService } from "@/services/user.service";
|
|
// type
|
|
|
|
// services
|
|
const userService = new UserService();
|
|
|
|
export default function ProfileNotificationPage() {
|
|
// fetching user email notification settings
|
|
const { data, isLoading } = useSWR("CURRENT_USER_EMAIL_NOTIFICATION_SETTINGS", () =>
|
|
userService.currentUserEmailNotificationSettings()
|
|
);
|
|
|
|
if (!data || isLoading) {
|
|
return <EmailSettingsLoader />;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<PageHead title="Profile - Email Preference" />
|
|
<div className="mx-auto mt-8 h-full w-full md:px-6 px-4 lg:px-20 pb-8 vertical-scrollbar scrollbar-md">
|
|
<div className="flex gap-4 items-start pt-4 sm:pt-6 mb-2 pb-6 border-b border-custom-border-100">
|
|
<SidebarHamburgerToggle />
|
|
<div className="grow">
|
|
<div className="pb-1 text-xl font-medium text-custom-text-100">Email notifications</div>
|
|
<div className="text-sm font-normal text-custom-text-300">
|
|
Stay in the loop on Issues you are subscribed to. Enable this to get notified.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<EmailNotificationForm data={data} />
|
|
</div>
|
|
</>
|
|
);
|
|
}
|