1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/+apps/apps.tsx
Roman faa1cef307
PageRegistration & BaseRegistry refactoring (#1334)
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-11-12 16:29:02 +02:00

35 lines
1011 B
TypeScript

import React from "react";
import { observer } from "mobx-react";
import { Trans } from "@lingui/macro";
import { TabLayout, TabLayoutRoute } from "../layout/tab-layout";
import { HelmCharts, helmChartsRoute, helmChartsURL } from "../+apps-helm-charts";
import { HelmReleases, releaseRoute, releaseURL } from "../+apps-releases";
import { namespaceStore } from "../+namespaces/namespace.store";
@observer
export class Apps extends React.Component {
static get tabRoutes(): TabLayoutRoute[] {
const query = namespaceStore.getContextParams();
return [
{
title: <Trans>Charts</Trans>,
component: HelmCharts,
url: helmChartsURL(),
routePath: helmChartsRoute.path.toString(),
},
{
title: <Trans>Releases</Trans>,
component: HelmReleases,
url: releaseURL({ query }),
routePath: releaseRoute.path.toString(),
},
]
}
render() {
return (
<TabLayout className="Apps" tabs={Apps.tabRoutes}/>
)
}
}