1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-01 01:18:10 +02:00
unleash.unleash/frontend/src/component/admin/api/index.js
Fredrik Strand Oseberg 18287cdbd0 Fix/cleanup unused code (#651)
* fix: remove unused context code

* fix: refactor users

* fix: rename delete user

* fix: rename frontend

* fix: update feature view path

* fix: cleanup create feature

* fix: cleanup feature views

* fix: cleanup feature strategies

* fix: update paths

* fix: remove unused strategy components

* fix strategies link

* fix: update snapshots

* fix: import paths

* fix: add name to useEffect dependency
2022-02-04 10:36:08 +01:00

29 lines
782 B
JavaScript

import PropTypes from 'prop-types';
import ApiTokenList from '../api-token/ApiTokenList/ApiTokenList';
import AdminMenu from '../menu/AdminMenu';
import usePermissions from '../../../hooks/usePermissions';
import ConditionallyRender from '../../common/ConditionallyRender';
const ApiPage = ({ history, location }) => {
const { isAdmin } = usePermissions();
return (
<div>
<ConditionallyRender
condition={isAdmin()}
show={<AdminMenu history={history} />}
/>
<ApiTokenList location={location} />
</div>
);
};
ApiPage.propTypes = {
match: PropTypes.object.isRequired,
history: PropTypes.object.isRequired,
location: PropTypes.object.isRequired,
};
export default ApiPage;