2021-03-06 18:54:43 +03:00
|
|
|
import { FC, ReactNode } from 'react';
|
2021-02-14 15:23:42 +03:00
|
|
|
import { Row } from 'reactstrap';
|
2020-04-18 21:31:20 +03:00
|
|
|
import NoMenuLayout from '../common/NoMenuLayout';
|
|
|
|
|
2021-03-06 18:54:43 +03:00
|
|
|
const SettingsSections: FC<{ items: ReactNode[][] }> = ({ items }) => (
|
|
|
|
<>
|
|
|
|
{items.map((child, index) => (
|
|
|
|
<Row key={index}>
|
|
|
|
{child.map((subChild, subIndex) => (
|
2021-03-29 22:08:48 +03:00
|
|
|
<div key={subIndex} className="col-lg-6 mb-3">
|
2021-03-06 19:30:21 +03:00
|
|
|
{subChild}
|
2021-03-06 18:54:43 +03:00
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</Row>
|
|
|
|
))}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
|
|
|
|
const Settings = (RealTimeUpdates: FC, ShortUrlCreation: FC, UserInterface: FC, Visits: FC) => () => (
|
2020-04-25 10:49:54 +03:00
|
|
|
<NoMenuLayout>
|
2021-03-06 18:54:43 +03:00
|
|
|
<SettingsSections
|
|
|
|
items={[
|
|
|
|
[ <UserInterface />, <ShortUrlCreation /> ], // eslint-disable-line react/jsx-key
|
|
|
|
[ <Visits />, <RealTimeUpdates /> ], // eslint-disable-line react/jsx-key
|
|
|
|
]}
|
|
|
|
/>
|
2020-04-25 10:49:54 +03:00
|
|
|
</NoMenuLayout>
|
|
|
|
);
|
2020-04-18 21:31:20 +03:00
|
|
|
|
|
|
|
export default Settings;
|