-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into Vxrcel-clean
- Loading branch information
Showing
12 changed files
with
297 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/app/dashboard/(user-dashboard)/settings/notification/_components/header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
interface IProperties { | ||
notificationTitle: string; | ||
} | ||
|
||
const NotificationHeader = ({ notificationTitle }: IProperties) => { | ||
return ( | ||
<h4 className="mb-[17px] text-[24px] font-[700]">{notificationTitle}</h4> | ||
); | ||
}; | ||
|
||
NotificationHeader.PreviewProps = { | ||
notificationTitle: `Notification Alert`, | ||
} satisfies IProperties; | ||
|
||
export default NotificationHeader; |
22 changes: 22 additions & 0 deletions
22
.../dashboard/(user-dashboard)/settings/notification/_components/notification-switch-box.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Switch } from "~/components/ui/switch"; | ||
|
||
interface IProperties { | ||
title: string; | ||
description: string; | ||
} | ||
|
||
const NotificationSwitchBox = ({ title, description }: IProperties) => { | ||
return ( | ||
<section className="flex w-full items-center justify-between"> | ||
<div className="w-[55%]"> | ||
<p className="mb-[8px] font-[600]">{title}</p> | ||
<p className="text-[14px] text-neutral-dark-1">{description}</p> | ||
</div> | ||
<div> | ||
<Switch /> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default NotificationSwitchBox; |
128 changes: 125 additions & 3 deletions
128
src/app/dashboard/(user-dashboard)/settings/notification/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,127 @@ | ||
const page = () => { | ||
return <div>page</div>; | ||
"use client"; | ||
|
||
import { Check } from "lucide-react"; | ||
import { useState } from "react"; | ||
|
||
import CustomButton from "~/components/common/common-button/common-button"; | ||
import NotificationSettingSavedModal from "~/components/common/modals/notification-settings-saved"; | ||
import NotificationHeader from "./_components/header"; | ||
import NotificationSwitchBox from "./_components/notification-switch-box"; | ||
|
||
const NotificationPage = () => { | ||
const [isOpen, setOpen] = useState(false); | ||
|
||
const handleOpenModal = () => { | ||
setOpen(true); | ||
}; | ||
|
||
return ( | ||
<main className="text-neutral-dark-2"> | ||
{/* NOTIFICATION ALERT */} | ||
<section> | ||
<NotificationHeader notificationTitle={"Notification Alert"} /> | ||
<NotificationSwitchBox | ||
title={"Mobile push notifications"} | ||
description={ | ||
"Receive push notifications on mentions and comments via your mobile app" | ||
} | ||
/> | ||
</section> | ||
{/* EMAIL NOTIFICATION */} | ||
<section className="my-[30px]"> | ||
<NotificationHeader notificationTitle={"Email notifications"} /> | ||
<section className="flex flex-col gap-[24px]"> | ||
{/* option 1 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Activity in your workspace"} | ||
description={ | ||
"Receive emails when you get comments, mentions, page invites, reminders, access requests, and property changes" | ||
} | ||
/> | ||
</div> | ||
{/* option 2 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Activity in your workspace"} | ||
description={ | ||
"Receive emails about activity in your workspace, even when you are active on the app" | ||
} | ||
/> | ||
</div> | ||
{/* option 3 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Email digests"} | ||
description={ | ||
"Receive email digest every 8 hours for changes to pages you are subscribed to" | ||
} | ||
/> | ||
</div> | ||
{/* option 4 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Announcements and update emails"} | ||
description={ | ||
"Receive occasional emails about product launches and new features from notion" | ||
} | ||
/> | ||
</div> | ||
</section> | ||
</section> | ||
{/* SLACK NOTIFICATIONS */} | ||
<section className="my-[30px]"> | ||
<NotificationHeader notificationTitle={"Slack notifications"} /> | ||
<section className="flex flex-col gap-[24px]"> | ||
{/* option 1 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Activity in your workspace"} | ||
description={ | ||
"Receive emails when you get comments, mentions, page invites, reminders, access requests, and property changes" | ||
} | ||
/> | ||
</div> | ||
{/* option 2 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Always send email notifications"} | ||
description={ | ||
"Receive emails about activity in your workspace, even when you are active on the app" | ||
} | ||
/> | ||
</div> | ||
{/* option 3 */} | ||
<div> | ||
<NotificationSwitchBox | ||
title={"Announcements and update emails"} | ||
description={ | ||
"Receive email digest every 8 hours for changes to pages you are subscribed to" | ||
} | ||
/> | ||
</div> | ||
</section> | ||
</section> | ||
<section className="text-end"> | ||
<CustomButton | ||
variant="primary" | ||
icon={<Check />} | ||
isLeftIconVisible={true} | ||
isLoading={false} | ||
isDisabled={false} | ||
onClick={handleOpenModal} | ||
> | ||
Save Changes | ||
</CustomButton> | ||
<NotificationSettingSavedModal | ||
show={isOpen} | ||
onClose={function (): void { | ||
setOpen(false); | ||
}} | ||
/> | ||
</section> | ||
</main> | ||
); | ||
}; | ||
|
||
export default page; | ||
export default NotificationPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.