SystemInfomationTable.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { LoadingSpinner } from '@growi/ui/dist/components';
  2. import { useSWRxAdminHome } from '~/stores/admin/admin-home';
  3. const SystemInformationTable = () => {
  4. const { data: adminHomeData } = useSWRxAdminHome();
  5. const { growiVersion, nodeVersion, npmVersion, pnpmVersion } =
  6. adminHomeData ?? {};
  7. if (
  8. growiVersion == null ||
  9. nodeVersion == null ||
  10. npmVersion == null ||
  11. pnpmVersion == null
  12. ) {
  13. return <LoadingSpinner />;
  14. }
  15. return (
  16. <table
  17. data-testid="admin-system-information-table"
  18. className="table table-bordered"
  19. >
  20. <tbody>
  21. <tr>
  22. <th>GROWI</th>
  23. <td data-vrt-blackout>{growiVersion}</td>
  24. </tr>
  25. <tr>
  26. <th>node.js</th>
  27. <td>{nodeVersion}</td>
  28. </tr>
  29. <tr>
  30. <th>npm</th>
  31. <td>{npmVersion}</td>
  32. </tr>
  33. <tr>
  34. <th>pnpm</th>
  35. <td>{pnpmVersion}</td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. );
  40. };
  41. export default SystemInformationTable;