hunk.code_window: import { Namespaces, SelfSubjectAccessReviewResponse } from './types';
   export async function getNamespace(
     environmentId: EnvironmentId,
     namespace: string
   ) {
     try {
  
hunk.labels: keep keep add keep keep keep keep keep
hunk.after_edit: // getNamespace is used to retrieve a namespace using the Portainer backend
  
hunk.file_path: app/react/kubernetes/namespaces/service.ts
hunk.type: add
file: import { PropsWithChildren } from 'react';
  
  type Props = {
    headers?: string[];
    dataCy?: string;
  };
  
  export function DetailsTable({
    headers = [],
    dataCy,
    children,
  }: PropsWithChildren<Props>) {
    return (
      <table className="table" data-cy={dataCy}>
        {headers.length > 0 && (
          <thead>
            <tr>
              {headers.map((header) => (
                <th key={header}>{header}</th>
              ))}
            </tr>
          </thead>
        )}
        <tbody>{children}</tbody>
      </table>
    );
  }
  