github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/services/frontend-service/src/ui/Pages/Releases/ReleasesPage.tsx (about)

     1  /*This file is part of kuberpult.
     2  
     3  Kuberpult is free software: you can redistribute it and/or modify
     4  it under the terms of the Expat(MIT) License as published by
     5  the Free Software Foundation.
     6  
     7  Kuberpult is distributed in the hope that it will be useful,
     8  but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    10  MIT License for more details.
    11  
    12  You should have received a copy of the MIT License
    13  along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>.
    14  
    15  Copyright 2023 freiheit.com*/
    16  import { Releases } from '../../components/Releases/Releases';
    17  import { useGlobalLoadingState } from '../../utils/store';
    18  import { LoadingStateSpinner } from '../../utils/LoadingStateSpinner';
    19  import React from 'react';
    20  import { TopAppBar } from '../../components/TopAppBar/TopAppBar';
    21  
    22  export const ReleasesPage: React.FC = () => {
    23      const url = window.location.pathname.split('/');
    24      const app_name = url[url.length - 1];
    25  
    26      const [everythingLoaded, loadingState] = useGlobalLoadingState();
    27      if (!everythingLoaded) {
    28          return <LoadingStateSpinner loadingState={loadingState} />;
    29      }
    30  
    31      return (
    32          <div>
    33              <TopAppBar showAppFilter={false} showTeamFilter={false} showWarningFilter={false} />
    34              <main className="main-content">
    35                  <Releases app={app_name} />
    36              </main>
    37          </div>
    38      );
    39  };