import Switch from '../components/Switch'; import ColorPicker from '../components/ColorPicker'; import { SettingsState } from '../App'; interface ISetting { title: string; description: string; modifyElement: JSX.Element; } interface SettingsProps { settingsState: SettingsState; switchChange: (key: string, isOn: boolean) => void; colorChange: (color: string) => void; } const Settings: React.FC = ({ settingsState, switchChange, colorChange }) => { const settings: ISetting[] = [ { title: "Notification Collector", description: "Uncaps the 9+ limit for notifications, showing the real number.", modifyElement: switchChange('notificationCollector', isOn)} /> }, { title: "Lesson Alerts", description: "Sends a native browser notification ~5 minutes prior to lessons.", modifyElement: switchChange('lessonAlerts', isOn)} /> }, { title: "Animated Background", description: "Adds an animated background to BetterSEQTA. (May impact battery life)", modifyElement: switchChange('animatedBackground', isOn)} /> }, { title: "Animated Background Speed", description: "Controls the speed of the animated background.", modifyElement: switchChange('animatedBackgroundSpeed', isOn)} /> }, { title: "Custom Theme Colour", description: "Customise the overall theme colour of SEQTA Learn.", modifyElement: colorChange(color)} /> }, { title: "BetterSEQTA+", description: "Unlocks premium features.", modifyElement: switchChange('betterSEQTAPlus', isOn)} /> } ]; return (
{settings.map((setting, index) => (

{setting.title}

{setting.description}

{setting.modifyElement}
))}
); }; export default Settings;