2023-01-16 09:45:12 +00:00
|
|
|
import { sectionNames } from "@dashboard/intl";
|
2023-01-10 10:04:30 +00:00
|
|
|
import { parse as parseQs } from "qs";
|
|
|
|
import React from "react";
|
|
|
|
import { useIntl } from "react-intl";
|
|
|
|
import { Route, RouteComponentProps, Switch } from "react-router-dom";
|
|
|
|
|
|
|
|
import { WindowTitle } from "../components/WindowTitle";
|
|
|
|
import { AppListUrlQueryParams, AppPaths } from "./urls";
|
|
|
|
import AppListView from "./views/AppList";
|
|
|
|
|
|
|
|
const AppList: React.FC<RouteComponentProps> = () => {
|
|
|
|
const qs = parseQs(location.search.substr(1));
|
|
|
|
const params: AppListUrlQueryParams = qs;
|
|
|
|
|
|
|
|
return <AppListView params={params} />;
|
|
|
|
};
|
|
|
|
|
|
|
|
const Apps = () => {
|
|
|
|
const intl = useIntl();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<WindowTitle title={intl.formatMessage(sectionNames.apps)} />
|
|
|
|
<Switch>
|
|
|
|
<Route exact path={AppPaths.appListPath} component={AppList} />
|
|
|
|
</Switch>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Apps;
|