add responsiveness
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
"use client";
|
||||
import React from "react";
|
||||
import TopHeader from "../components/topHeader/TopHeader";
|
||||
import globalStyle from "../globalStyle.module.css";
|
||||
@@ -5,7 +6,10 @@ import styles from "./styles.module.css";
|
||||
import DeleteIcon from "../components/icons/delete";
|
||||
import SuccessToast from "../components/toast/success/successToast";
|
||||
import ActionButton from "../components/actionButton/ActionButton";
|
||||
import useIsMobile from "../hooks/useIsMobile";
|
||||
import Card from "./card/Card";
|
||||
const CredentialsPage = () => {
|
||||
const isMobile = useIsMobile();
|
||||
const sampleData = [
|
||||
{
|
||||
name: "mongo tls ca crt",
|
||||
@@ -66,33 +70,43 @@ const CredentialsPage = () => {
|
||||
topbarTitle="Credentials"
|
||||
requiredButtons={["title", "add", "search", "env"]}
|
||||
/>
|
||||
<div className={styles.tableContainer}>
|
||||
<table className={styles.table}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="45%">Name</th>
|
||||
<th width="45%">Organization ID</th>
|
||||
<th width="10%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{isMobile ? (
|
||||
<div className={styles.cardContainer}>
|
||||
<Card />
|
||||
<Card />
|
||||
<Card />
|
||||
<Card />
|
||||
<Card />
|
||||
</div>
|
||||
) : (
|
||||
<div className={styles.tableContainer}>
|
||||
<table className={styles.table}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="45%">Name</th>
|
||||
<th width="45%">Organization ID</th>
|
||||
<th width="10%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{sampleData.map((org, index) => {
|
||||
return (
|
||||
<tr key={index}>
|
||||
<td>{org.name}</td>
|
||||
<td>{org.organizationID}</td>
|
||||
<td className={styles.actions}>
|
||||
<div>
|
||||
<ActionButton icon={<DeleteIcon />} />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<tbody>
|
||||
{sampleData.map((org, index) => {
|
||||
return (
|
||||
<tr key={index}>
|
||||
<td>{org.name}</td>
|
||||
<td>{org.organizationID}</td>
|
||||
<td className={styles.actions}>
|
||||
<div>
|
||||
<ActionButton icon={<DeleteIcon />} />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user