add
This commit is contained in:
@@ -112,14 +112,15 @@ const AgentsPage = () => {
|
|||||||
topbarTitle="Agents"
|
topbarTitle="Agents"
|
||||||
requiredButtons={["title", "add", "search"]}
|
requiredButtons={["title", "add", "search"]}
|
||||||
/>
|
/>
|
||||||
{isMobile ? (
|
|
||||||
<div className={styles.cardContainer}>
|
<div className={styles.cardContainer}>
|
||||||
<MobileSearchBar />
|
<MobileSearchBar />
|
||||||
{sampleData.map((data, key) => {
|
{isMobile &&
|
||||||
|
sampleData.map((data, key) => {
|
||||||
return <Card data={data} key={key} />;
|
return <Card data={data} key={key} />;
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className={styles.tableContainer}>
|
<div className={styles.tableContainer}>
|
||||||
<table className={styles.table}>
|
<table className={styles.table}>
|
||||||
<thead>
|
<thead>
|
||||||
@@ -135,7 +136,8 @@ const AgentsPage = () => {
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{sampleData.map((org, index) => {
|
{!isMobile &&
|
||||||
|
sampleData.map((org, index) => {
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={index}
|
key={index}
|
||||||
@@ -164,7 +166,6 @@ const AgentsPage = () => {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,7 +86,15 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
overflow: auto;
|
display: none;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.cardContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tableContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.searchBarContainer {
|
.searchBarContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -103,7 +111,6 @@
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
background-color: transparent;
|
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const hamburger = () => {
|
const hamburger = (props) => {
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
@@ -8,10 +8,11 @@ const hamburger = () => {
|
|||||||
height={24}
|
height={24}
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
fill="none"
|
fill="none"
|
||||||
|
{...props}
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M3 4H21V6H3V4ZM3 11H15V13H3V11ZM3 18H21V20H3V18Z"
|
d="M3 4H21V6H3V4ZM3 11H15V13H3V11ZM3 18H21V20H3V18Z"
|
||||||
fill="white"
|
fill="currentColor"
|
||||||
style={{ fillOpacity: 1 }}
|
style={{ fillOpacity: 1 }}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@@ -1,19 +1,99 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React from "react";
|
import React, { useState } from "react";
|
||||||
import styles from "./styles.module.css";
|
import styles from "./styles.module.css";
|
||||||
import NavLeft from "./navleft/Header";
|
import NavLeft from "./navleft/Header";
|
||||||
import NavRight from "./navright/Profile";
|
import NavRight from "./navright/Profile";
|
||||||
import HamburgerIcon from "../../components/icons/hamburger";
|
import HamburgerIcon from "../../components/icons/hamburger";
|
||||||
import useIsMobile from "@/app/hooks/useIsMobile";
|
import useIsMobile from "@/app/hooks/useIsMobile";
|
||||||
|
import LogoIcon from "../icons/logo";
|
||||||
|
import HomeIcon from "../icons/home";
|
||||||
|
import OrganizationIcon from "../icons/organization";
|
||||||
|
import ProjectIcon from "../icons/project";
|
||||||
|
import UserIcon from "../icons/user";
|
||||||
|
import RolesIcon from "../icons/roles";
|
||||||
|
import CredentialsIcon from "../icons/credentials";
|
||||||
|
import AgentIcon from "../icons/agent";
|
||||||
|
import DownloadIcon from "../icons/download";
|
||||||
|
import useNavigations from "@/app/hooks/useNagivation";
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
|
const [triggerDropDown, setTriggerDropDown] = useState(false);
|
||||||
|
const {
|
||||||
|
navToAgents,
|
||||||
|
navToCredentials,
|
||||||
|
navToProject,
|
||||||
|
navToRoles,
|
||||||
|
navToHome,
|
||||||
|
navToOrganization,
|
||||||
|
navToUsers,
|
||||||
|
} = useNavigations();
|
||||||
|
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
return (
|
return (
|
||||||
<div className={styles.mainContainer}>
|
<div className={styles.mainContainer}>
|
||||||
{/* Mobile Hamburger Button */}
|
{/* Mobile Hamburger Button */}
|
||||||
<div className={styles.mobileHamburger}>
|
<div className={styles.mobileHamburger}>
|
||||||
{isMobile && <HamburgerIcon />}
|
<div className={styles.hamburgerMenu}>
|
||||||
|
<HamburgerIcon
|
||||||
|
onClick={() => setTriggerDropDown(!triggerDropDown)}
|
||||||
|
className={triggerDropDown ? styles.active : ""}
|
||||||
|
/>
|
||||||
|
{triggerDropDown && (
|
||||||
|
<div className={styles.dropDownMenu}>
|
||||||
|
<div className={styles.headings}>
|
||||||
|
<div>
|
||||||
|
<div className={styles.logoContainer}>
|
||||||
|
<LogoIcon />
|
||||||
|
</div>
|
||||||
|
<div className={styles.info}>
|
||||||
|
<p>Internal Developer Platform</p>
|
||||||
|
<p>By Project Moonshot Inc.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={styles.navs}>
|
||||||
|
<div className={styles.nav} onClick={navToHome}>
|
||||||
|
<HomeIcon />
|
||||||
|
<p>Home</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.nav} onClick={navToOrganization}>
|
||||||
|
<OrganizationIcon />
|
||||||
|
<p>Organization</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.nav} onClick={navToProject}>
|
||||||
|
<ProjectIcon />
|
||||||
|
<p>Project</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.nav} onClick={navToUsers}>
|
||||||
|
<UserIcon />
|
||||||
|
<p>Users</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.nav} onClick={navToRoles}>
|
||||||
|
<RolesIcon />
|
||||||
|
<p>Roles</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.nav} onClick={navToCredentials}>
|
||||||
|
<CredentialsIcon />
|
||||||
|
<p>Credentials</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.nav} onClick={navToAgents}>
|
||||||
|
<AgentIcon />
|
||||||
|
<p>Agents</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={styles.footer}>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<p>Download ICTL v3</p>
|
||||||
|
<DownloadIcon />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
<NavLeft />
|
<NavLeft />
|
||||||
</div>
|
</div>
|
||||||
{/* Mobile Menu Button */}
|
{/* Mobile Menu Button */}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
background: #2d3143;
|
background: #2d3143;
|
||||||
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.25);
|
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.25);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 4;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|||||||
@@ -19,8 +19,11 @@ const Profile = () => {
|
|||||||
{/* Profile Section */}
|
{/* Profile Section */}
|
||||||
<div className={styles.profileContainer}>
|
<div className={styles.profileContainer}>
|
||||||
{/* Profile */}
|
{/* Profile */}
|
||||||
{!isMobile && (
|
|
||||||
<div className={styles.profileBadge} onClick={() => setOpen(!open)}>
|
<div
|
||||||
|
className={styles.profileBadgeButton}
|
||||||
|
onClick={() => setOpen(!open)}
|
||||||
|
>
|
||||||
{/* Username and Role*/}
|
{/* Username and Role*/}
|
||||||
{sampleData.map((data, index) => {
|
{sampleData.map((data, index) => {
|
||||||
return (
|
return (
|
||||||
@@ -37,17 +40,15 @@ const Profile = () => {
|
|||||||
<EllipsisIcon />
|
<EllipsisIcon />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Mobile Ellipsis */}
|
{/* Mobile Ellipsis */}
|
||||||
{isMobile && (
|
|
||||||
<div
|
<div
|
||||||
className={`${styles.mobileEllipsis} ${open ? styles.active : ""}`}
|
className={`${styles.mobileEllipsis} ${open ? styles.active : ""}`}
|
||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
>
|
>
|
||||||
<EllipsisIcon style={isMobile ? styles.rotated : ""} />
|
<EllipsisIcon style={isMobile ? styles.rotated : ""} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Dropdown */}
|
{/* Dropdown */}
|
||||||
{open && <ProfileDropdown isMobile={isMobile} user={sampleData[0]} />}
|
{open && <ProfileDropdown isMobile={isMobile} user={sampleData[0]} />}
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.profileBadge {
|
.profileBadge,
|
||||||
|
.profileBadgeButton {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 6px 0 6px 8px;
|
padding: 6px 0 6px 8px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@@ -153,6 +154,9 @@
|
|||||||
.rotated {
|
.rotated {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
}
|
}
|
||||||
|
.mobileEllipsis {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.mobileEllipsis.active {
|
.mobileEllipsis.active {
|
||||||
color: #959aff;
|
color: #959aff;
|
||||||
}
|
}
|
||||||
@@ -183,7 +187,9 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
}
|
}
|
||||||
|
.profileBadgeButton {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.profileBadge {
|
.profileBadge {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
|
|||||||
@@ -9,14 +9,154 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Mobile */
|
/* Mobile */
|
||||||
@media (max-width: 768px) {
|
|
||||||
.mobileHamburger {
|
.hamburgerMenu {
|
||||||
display: flex;
|
display: none;
|
||||||
height: 61px;
|
height: 61px;
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.active path {
|
||||||
|
color: #8187ff;
|
||||||
|
}
|
||||||
|
.dropDownMenu {
|
||||||
|
display: flex;
|
||||||
|
width: 100vw;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
background: linear-gradient(0deg, #2d3143 0%, #191a24 100%);
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
top: 60px;
|
||||||
|
animation-name: dropDownAnimation;
|
||||||
|
animation-duration: 200ms;
|
||||||
|
}
|
||||||
|
.headings {
|
||||||
|
display: flex;
|
||||||
|
padding: 32px 16px 16px 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 24px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.headings > div {
|
||||||
|
display: flex;
|
||||||
|
padding-right: 6px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.logoContainer {
|
||||||
|
display: flex;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 9px;
|
||||||
|
aspect-ratio: 1/1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 4px;
|
||||||
|
flex: 1 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info p {
|
||||||
|
color: #85869b;
|
||||||
|
font-size: 14px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: normal;
|
||||||
|
letter-spacing: 0.07px;
|
||||||
|
}
|
||||||
|
.info > p:nth-child(1) {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 18px; /* 100% */
|
||||||
|
}
|
||||||
|
.navs {
|
||||||
|
display: flex;
|
||||||
|
padding: 16px 0;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.nav {
|
||||||
|
display: flex;
|
||||||
|
padding: 8px 16px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.nav:hover {
|
||||||
|
background: rgba(149, 154, 255, 0.05);
|
||||||
|
}
|
||||||
|
.nav path {
|
||||||
|
stroke: #858699;
|
||||||
|
}
|
||||||
|
.nav:hover path {
|
||||||
|
stroke: #d2d3e0;
|
||||||
|
}
|
||||||
|
.nav p {
|
||||||
|
color: #d2d3e1;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
display: flex;
|
||||||
|
padding: 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.footer > div {
|
||||||
|
display: flex;
|
||||||
|
padding: 12px 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 24px;
|
||||||
|
align-self: stretch;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: #1d1e2c;
|
||||||
|
}
|
||||||
|
.footer > div > div {
|
||||||
|
display: flex;
|
||||||
|
height: 24px;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes dropDownAnimation {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-5%);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.mobileHamburger {
|
||||||
|
display: flex;
|
||||||
|
height: 61px;
|
||||||
|
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainContainer {
|
.mainContainer {
|
||||||
@@ -25,4 +165,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
.hamburgerMenu {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,31 +13,19 @@ import AgentIcon from "../icons/agent";
|
|||||||
import DownloadIcon from "../icons/download";
|
import DownloadIcon from "../icons/download";
|
||||||
import LogoIcon from "../icons/logo";
|
import LogoIcon from "../icons/logo";
|
||||||
import ArrowDownIcon from "../icons/arrowDown";
|
import ArrowDownIcon from "../icons/arrowDown";
|
||||||
|
import useNavigations from "@/app/hooks/useNagivation";
|
||||||
|
|
||||||
const Sidebar = () => {
|
const Sidebar = () => {
|
||||||
const router = useRouter();
|
|
||||||
const [isCollapsed, setIsCollapsed] = useState(false);
|
const [isCollapsed, setIsCollapsed] = useState(false);
|
||||||
const navToHome = () => {
|
const {
|
||||||
router.push("/home");
|
navToAgents,
|
||||||
};
|
navToCredentials,
|
||||||
const navToOrganization = () => {
|
navToProject,
|
||||||
router.push("/organization");
|
navToRoles,
|
||||||
};
|
navToHome,
|
||||||
const navToProject = () => {
|
navToOrganization,
|
||||||
router.push("/projects");
|
navToUsers,
|
||||||
};
|
} = useNavigations();
|
||||||
const navToUsers = () => {
|
|
||||||
router.push("/users");
|
|
||||||
};
|
|
||||||
const navToRoles = () => {
|
|
||||||
router.push("/roles");
|
|
||||||
};
|
|
||||||
const navToCredentials = () => {
|
|
||||||
router.push("/credentials");
|
|
||||||
};
|
|
||||||
const navToAgents = () => {
|
|
||||||
router.push("/agents");
|
|
||||||
};
|
|
||||||
|
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ a {
|
|||||||
}
|
}
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
:root {
|
:root {
|
||||||
--table-font-size: 9px;
|
--table-font-size: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
export default function useIsMobile(breakpoint = 768) {
|
export default function useIsMobile(breakpoint = 768) {
|
||||||
const [isMobile, setIsMobile] = useState(false);
|
const [isMobile, setIsMobile] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const checkScreen = () => {
|
const checkScreen = () => {
|
||||||
|
|||||||
36
frontend/src/app/hooks/useNagivation.jsx
Normal file
36
frontend/src/app/hooks/useNagivation.jsx
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
const useNavigations = () => {
|
||||||
|
const router = useRouter();
|
||||||
|
const navToHome = () => {
|
||||||
|
router.push("/home");
|
||||||
|
};
|
||||||
|
const navToOrganization = () => {
|
||||||
|
router.push("/organization");
|
||||||
|
};
|
||||||
|
const navToProject = () => {
|
||||||
|
router.push("/projects");
|
||||||
|
};
|
||||||
|
const navToUsers = () => {
|
||||||
|
router.push("/users");
|
||||||
|
};
|
||||||
|
const navToRoles = () => {
|
||||||
|
router.push("/roles");
|
||||||
|
};
|
||||||
|
const navToCredentials = () => {
|
||||||
|
router.push("/credentials");
|
||||||
|
};
|
||||||
|
const navToAgents = () => {
|
||||||
|
router.push("/agents");
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
navToHome,
|
||||||
|
navToAgents,
|
||||||
|
navToCredentials,
|
||||||
|
navToOrganization,
|
||||||
|
navToProject,
|
||||||
|
navToRoles,
|
||||||
|
navToUsers,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export default useNavigations;
|
||||||
@@ -68,14 +68,13 @@ const OrganizationPage = () => {
|
|||||||
topbarTitle="Organization"
|
topbarTitle="Organization"
|
||||||
requiredButtons={["title", "add", "search"]}
|
requiredButtons={["title", "add", "search"]}
|
||||||
/>
|
/>
|
||||||
{isMobile ? (
|
|
||||||
<div className={styles.cardContainer}>
|
<div className={styles.cardContainer}>
|
||||||
<MobileSearchBar />
|
<MobileSearchBar />
|
||||||
{sampleData.map((data, key) => (
|
{isMobile &&
|
||||||
<Card data={data} key={key} />
|
sampleData.map((data, key) => <Card data={data} key={key} />)}
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className={styles.tableContainer}>
|
<div className={styles.tableContainer}>
|
||||||
<table className={styles.table}>
|
<table className={styles.table}>
|
||||||
<thead>
|
<thead>
|
||||||
@@ -87,7 +86,8 @@ const OrganizationPage = () => {
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{sampleData.map((org, index) => {
|
{!isMobile &&
|
||||||
|
sampleData.map((org, index) => {
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td>{org.organizationName}</td>
|
<td>{org.organizationName}</td>
|
||||||
@@ -103,7 +103,6 @@ const OrganizationPage = () => {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -61,4 +61,13 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.cardContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tableContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,10 +181,11 @@ const ProjectsPage = () => {
|
|||||||
topbarTitle="Project"
|
topbarTitle="Project"
|
||||||
requiredButtons={["title", "add", "search"]}
|
requiredButtons={["title", "add", "search"]}
|
||||||
/>
|
/>
|
||||||
{isMobile ? (
|
|
||||||
<div className={styles.cardContainer}>
|
<div className={styles.cardContainer}>
|
||||||
<MobileSearchBar />
|
<MobileSearchBar />
|
||||||
{sampleData.map((data, key) => (
|
{isMobile &&
|
||||||
|
sampleData.map((data, key) => (
|
||||||
<Card
|
<Card
|
||||||
data={data}
|
data={data}
|
||||||
key={key}
|
key={key}
|
||||||
@@ -192,7 +193,7 @@ const ProjectsPage = () => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className={styles.tableContainer}>
|
<div className={styles.tableContainer}>
|
||||||
<table className={styles.table}>
|
<table className={styles.table}>
|
||||||
<thead>
|
<thead>
|
||||||
@@ -207,7 +208,8 @@ const ProjectsPage = () => {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{sampleData.map((project, index) => {
|
{!isMobile &&
|
||||||
|
sampleData.map((project, index) => {
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={index}
|
key={index}
|
||||||
@@ -259,7 +261,6 @@ const ProjectsPage = () => {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -92,4 +92,13 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.cardContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tableContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user