diff --git a/src/pages/Authorized.js b/src/pages/Authorized.js index e1ad24a17e88f2b88a08dd8eb296073548474ff5..c29d9610e7b2873c8ca5e0085a865cfc6ab9ffb0 100644 --- a/src/pages/Authorized.js +++ b/src/pages/Authorized.js @@ -1,32 +1,13 @@ import React from 'react'; import RenderAuthorized from '@/components/Authorized'; -import Exception from '@/components/Exception'; import { getAuthority } from '@/utils/authority'; -import { formatMessage } from 'umi/locale'; -import Link from 'umi/link'; import Redirect from 'umi/redirect'; const Authority = getAuthority(); const Authorized = RenderAuthorized(Authority); -export default ({ children }) => { - let noMatch = ( - - ); - // if Authority === ['guest'] redirect to /user/login - // You can implement the logic here. - if (Authority === 'guest' || Authority.join('') === 'guest') { - noMatch = ; - } - return ( - - {children} - - ); -}; +export default ({ children }) => ( + }> + {children} + +);