refactor(web): remove typescript
This commit is contained in:
@@ -15,11 +15,9 @@ import Box from '@mui/material/Box';
|
||||
import Grid from '@mui/material/Grid';
|
||||
import Tabs from '@mui/material/Tabs';
|
||||
import Tab from '@mui/material/Tab';
|
||||
|
||||
import useFormatMessage from 'hooks/useFormatMessage';
|
||||
import { GET_APP } from 'graphql/queries/get-app';
|
||||
import * as URLS from 'config/urls';
|
||||
|
||||
import AppIcon from 'components/AppIcon';
|
||||
import Container from 'components/Container';
|
||||
import PageTitle from 'components/PageTitle';
|
||||
@@ -27,17 +25,11 @@ import AdminApplicationSettings from 'components/AdminApplicationSettings';
|
||||
import AdminApplicationAuthClients from 'components/AdminApplicationAuthClients';
|
||||
import AdminApplicationCreateAuthClient from 'components/AdminApplicationCreateAuthClient';
|
||||
import AdminApplicationUpdateAuthClient from 'components/AdminApplicationUpdateAuthClient';
|
||||
|
||||
type AdminApplicationParams = {
|
||||
appKey: string;
|
||||
};
|
||||
|
||||
export default function AdminApplication(): React.ReactElement | null {
|
||||
export default function AdminApplication() {
|
||||
const theme = useTheme();
|
||||
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('md'));
|
||||
const formatMessage = useFormatMessage();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const connectionsPathMatch = useMatch({
|
||||
path: URLS.ADMIN_APP_CONNECTIONS_PATTERN,
|
||||
end: false,
|
||||
@@ -50,16 +42,11 @@ export default function AdminApplication(): React.ReactElement | null {
|
||||
path: URLS.ADMIN_APP_AUTH_CLIENTS_PATTERN,
|
||||
end: false,
|
||||
});
|
||||
|
||||
const { appKey } = useParams() as AdminApplicationParams;
|
||||
const { appKey } = useParams();
|
||||
const { data, loading } = useQuery(GET_APP, { variables: { key: appKey } });
|
||||
|
||||
const app = data?.getApp || {};
|
||||
|
||||
const goToAuthClientsPage = () => navigate('auth-clients');
|
||||
|
||||
if (loading) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Container sx={{ py: 3, display: 'flex', justifyContent: 'center' }}>
|
Reference in New Issue
Block a user