2021-03-06 16:54:43 +01:00
|
|
|
import { FC, ReactNode } from 'react';
|
2021-02-14 13:23:42 +01:00
|
|
|
import { Row } from 'reactstrap';
|
2021-12-30 10:02:31 +01:00
|
|
|
import { NoMenuLayout } from '../common/NoMenuLayout';
|
2020-04-18 20:31:20 +02:00
|
|
|
|
2021-03-06 16:54:43 +01:00
|
|
|
const SettingsSections: FC<{ items: ReactNode[][] }> = ({ items }) => (
|
|
|
|
<>
|
|
|
|
{items.map((child, index) => (
|
|
|
|
<Row key={index}>
|
|
|
|
{child.map((subChild, subIndex) => (
|
2021-12-23 17:53:06 +01:00
|
|
|
<div key={subIndex} className={`col-lg-${12 / child.length} mb-3`}>
|
2021-03-06 17:30:21 +01:00
|
|
|
{subChild}
|
2021-03-06 16:54:43 +01:00
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</Row>
|
|
|
|
))}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
|
2021-12-24 14:15:28 +01:00
|
|
|
const Settings = (
|
|
|
|
RealTimeUpdates: FC,
|
|
|
|
ShortUrlCreation: FC,
|
|
|
|
ShortUrlsList: FC,
|
|
|
|
UserInterface: FC,
|
|
|
|
Visits: FC,
|
|
|
|
Tags: FC,
|
|
|
|
) => () => (
|
2020-04-25 09:49:54 +02:00
|
|
|
<NoMenuLayout>
|
2021-03-06 16:54:43 +01:00
|
|
|
<SettingsSections
|
|
|
|
items={[
|
2021-12-24 14:15:28 +01:00
|
|
|
[ <UserInterface />, <Visits /> ], // eslint-disable-line react/jsx-key
|
|
|
|
[ <ShortUrlCreation />, <ShortUrlsList /> ], // eslint-disable-line react/jsx-key
|
|
|
|
[ <Tags />, <RealTimeUpdates /> ], // eslint-disable-line react/jsx-key
|
2021-03-06 16:54:43 +01:00
|
|
|
]}
|
|
|
|
/>
|
2020-04-25 09:49:54 +02:00
|
|
|
</NoMenuLayout>
|
|
|
|
);
|
2020-04-18 20:31:20 +02:00
|
|
|
|
|
|
|
export default Settings;
|