mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 15:19:00 +00:00
Chore: Move usePlugins closer to roles pages
This commit is contained in:
parent
910d480b1b
commit
c696619b98
@ -3,7 +3,7 @@ import { useEffect } from 'react';
|
|||||||
import { useNotification, useFetchClient, useAPIErrorHandler } from '@strapi/helper-plugin';
|
import { useNotification, useFetchClient, useAPIErrorHandler } from '@strapi/helper-plugin';
|
||||||
import { useQueries } from 'react-query';
|
import { useQueries } from 'react-query';
|
||||||
|
|
||||||
import { cleanPermissions, getTrad } from '../utils';
|
import { cleanPermissions, getTrad } from '../../../utils';
|
||||||
|
|
||||||
export const usePlugins = () => {
|
export const usePlugins = () => {
|
||||||
const toggleNotification = useNotification();
|
const toggleNotification = useNotification();
|
||||||
@ -27,9 +27,9 @@ import { useMutation } from 'react-query';
|
|||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
import UsersPermissions from '../../../components/UsersPermissions';
|
import UsersPermissions from '../../../components/UsersPermissions';
|
||||||
import { usePlugins } from '../../../hooks/usePlugins';
|
|
||||||
import getTrad from '../../../utils/getTrad';
|
import getTrad from '../../../utils/getTrad';
|
||||||
import { createRoleSchema } from '../constants';
|
import { createRoleSchema } from '../constants';
|
||||||
|
import { usePlugins } from '../hooks/usePlugins';
|
||||||
|
|
||||||
export const CreatePage = () => {
|
export const CreatePage = () => {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
|
|||||||
@ -29,9 +29,9 @@ import { useQuery, useMutation } from 'react-query';
|
|||||||
import { useRouteMatch } from 'react-router-dom';
|
import { useRouteMatch } from 'react-router-dom';
|
||||||
|
|
||||||
import UsersPermissions from '../../../components/UsersPermissions';
|
import UsersPermissions from '../../../components/UsersPermissions';
|
||||||
import { usePlugins } from '../../../hooks/usePlugins';
|
|
||||||
import getTrad from '../../../utils/getTrad';
|
import getTrad from '../../../utils/getTrad';
|
||||||
import { createRoleSchema } from '../constants';
|
import { createRoleSchema } from '../constants';
|
||||||
|
import { usePlugins } from '../hooks/usePlugins';
|
||||||
|
|
||||||
export const EditPage = () => {
|
export const EditPage = () => {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user