Skip to content

Commit c356813

Browse files
committed
Dashboard: Remove chakra provider from team/settings/notifications page (#7479)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refactoring the notifications settings page by renaming components, updating the layout, and improving the user interface for managing notifications. ### Detailed summary - Deleted `SettingsNotificationsPage` and replaced it with `Notifications`. - Updated the main page layout to include a header and description for notifications. - Enhanced the `Notifications` component with a new background and border styling. - Added a separator line in the `Notifications` component. - Removed unnecessary wrapper from `SettingSwitch` layout. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 1c638ed commit c356813

File tree

4 files changed

+16
-28
lines changed

4 files changed

+16
-28
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function TeamMembersSettingsPage(props: {
2727
return (
2828
<div>
2929
<h2 className="font-semibold text-2xl tracking-tight">Members</h2>
30-
<p className="text-muted-foreground text-sm">
30+
<p className="text-muted-foreground">
3131
Manage team members and invitations
3232
</p>
3333

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/Notifications.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ export const Notifications: React.FC<NotificationsProps> = ({ account }) => {
3737
};
3838

3939
return (
40-
<div>
40+
<div className="p-4 bg-card border rounded-lg">
4141
<SettingSwitch
4242
checked={preferences?.billing === "email"}
4343
description="Approaching and exceeding usage credits"
4444
label="Reminders"
4545
onCheckedChange={(v) => handleChange("billing", v)}
4646
/>
4747

48+
<div className="border-t border-dashed my-4" />
49+
4850
<SettingSwitch
4951
checked={preferences?.updates === "email"}
5052
description="New features and key product updates"
@@ -63,7 +65,7 @@ function SettingSwitch(props: {
6365
}) {
6466
const id = useId();
6567
return (
66-
<div className="flex items-center justify-between gap-6 border-border border-b py-6">
68+
<div className="flex items-center justify-between gap-6">
6769
<div>
6870
<Label className="text-foreground text-lg" htmlFor={id}>
6971
{props.label}

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/notifications/NotificationsPage.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { ChakraProviderSetup } from "chakra/ChakraProviderSetup";
21
import { getValidAccount } from "../../../../../../account/settings/getAccount";
3-
import { SettingsNotificationsPage } from "./NotificationsPage";
2+
import { Notifications } from "./Notifications";
43

54
export default async function Page(props: {
65
params: Promise<{
@@ -13,8 +12,15 @@ export default async function Page(props: {
1312
);
1413

1514
return (
16-
<ChakraProviderSetup>
17-
<SettingsNotificationsPage account={account} />
18-
</ChakraProviderSetup>
15+
<div>
16+
<div className="mb-4">
17+
<h1 className="font-semibold text-2xl tracking-tight">Notifications</h1>
18+
<p className="text-muted-foreground">
19+
Configure your email notification preferences
20+
</p>
21+
</div>
22+
23+
<Notifications account={account} />
24+
</div>
1925
);
2026
}

0 commit comments

Comments
 (0)