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-12-23 19:53:06 +03:00
|
|
|
<div key={subIndex} className={`col-lg-${12 / child.length} mb-3`}>
|
2021-03-06 19:30:21 +03:00
|
|
|
{subChild}
|
2021-03-06 18:54:43 +03:00
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</Row>
|
|
|
|
))}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
|
2021-12-24 16:15:28 +03:00
|
|
|
const Settings = (
|
|
|
|
RealTimeUpdates: FC,
|
|
|
|
ShortUrlCreation: FC,
|
|
|
|
ShortUrlsList: FC,
|
|
|
|
UserInterface: FC,
|
|
|
|
Visits: FC,
|
|
|
|
Tags: FC,
|
|
|
|
) => () => (
|
2020-04-25 10:49:54 +03:00
|
|
|
<NoMenuLayout>
|
2021-03-06 18:54:43 +03:00
|
|
|
<SettingsSections
|
|
|
|
items={[
|
2021-12-24 16:15:28 +03: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 18:54:43 +03:00
|
|
|
]}
|
|
|
|
/>
|
2020-04-25 10:49:54 +03:00
|
|
|
</NoMenuLayout>
|
|
|
|
);
|
2020-04-18 21:31:20 +03:00
|
|
|
|
|
|
|
export default Settings;
|