payment-backoffice/app/features/Pages/Settings/SettingsPageClient.tsx
2025-10-25 11:39:24 +02:00

40 lines
1.1 KiB
TypeScript

"use client";
import React, { useState } from "react";
import { Box, Typography } from "@mui/material";
import SettingsAccountSecurity from "./SettingsAccountSecurity";
import SettingsPersonalInfo from "./SettingsPersonalInfo";
import SettingsSidebar from "./SettingsSidebar";
const SettingsPageClient: React.FC = () => {
const [activeSection, setActiveSection] = useState<"personal" | "account">(
"personal"
);
return (
<Box sx={{ p: 3, display: "flex", flexDirection: "column", gap: 3 }}>
<Typography variant="h5" fontWeight={600}>
Settings
</Typography>
<Box sx={{ display: "flex", gap: 3 }}>
<SettingsSidebar
active={activeSection}
onChange={(
section:
| string
| ((prevState: "personal" | "account") => "personal" | "account")
) => setActiveSection(section)}
/>
<Box sx={{ flex: 1 }}>
{activeSection === "personal" && <SettingsPersonalInfo />}
{activeSection === "account" && <SettingsAccountSecurity />}
</Box>
</Box>
</Box>
);
};
export default SettingsPageClient;