mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-01 01:18:10 +02:00
* 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
29 lines
782 B
JavaScript
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;
|