Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurudeen38 committed Nov 8, 2022
1 parent 0f4be1c commit 25a3be0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions web/src/server/ServerDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import PageHeader from 'common/PageHeader';
import useSocket from 'hooks/useSocket';
import ServerDetailServicesTabPanel from './ServerDetailServicesTabPanel';
import { ServerResponseType, ServerServiceNameType } from './ServerType';

export default function ServerDetail() {
const { host } = useParams<{ host: string }>();
Expand Down Expand Up @@ -48,6 +50,23 @@ export default function ServerDetail() {
)
)}
</Tabs>

{Object.keys(servicesGroupedByName)?.map(
(serverName: string, index: number) => (
<div key={index}>
{index === tabIndex && (
<ServerDetailServicesTabPanel
serverName={serverName as ServerServiceNameType}
serverData={
servicesGroupedByName[
serverName as ServerServiceNameType
]?.at(-1) as ServerResponseType
} // get the last object of service
/>
)}
</div>
)
)}
</>
</LoadingContent>
</Container>
Expand Down

0 comments on commit 25a3be0

Please sign in to comment.