Added add ogranization page and project page
This commit is contained in:
@@ -1,34 +1,39 @@
|
||||
"use client";
|
||||
import React from "react";
|
||||
import styles from "./styles.module.css";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
|
||||
const TopHeader = (props) => {
|
||||
const pathName = usePathname();
|
||||
console.log(pathName);
|
||||
const router = useRouter();
|
||||
const handleNavigateToAdd = () => {
|
||||
router.push(`${pathName}/add`);
|
||||
};
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.title}>
|
||||
<p>{props.topbarTitle}</p>
|
||||
</div>
|
||||
<div className={styles.actionBar}>
|
||||
<div className={styles.searchBarContainer}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={24}
|
||||
height={24}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M19.5527 19.5536L14.7064 14.7074M9.16822 16.7847C13.3741 16.7847 16.7837 13.3751 16.7837 9.1692C16.7837 4.96328 13.3741 1.55371 9.16822 1.55371C4.9623 1.55371 1.55273 4.96328 1.55273 9.1692C1.55273 13.3751 4.9623 16.7847 9.16822 16.7847Z"
|
||||
stroke="#858699"
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
{!props.state && (
|
||||
<div className={styles.searchBarContainer}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={24}
|
||||
height={24}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M19.5527 19.5536L14.7064 14.7074M9.16822 16.7847C13.3741 16.7847 16.7837 13.3751 16.7837 9.1692C16.7837 4.96328 13.3741 1.55371 9.16822 1.55371C4.9623 1.55371 1.55273 4.96328 1.55273 9.1692C1.55273 13.3751 4.9623 16.7847 9.16822 16.7847Z"
|
||||
stroke="#858699"
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
{pathName === "/credentials" ? (
|
||||
<div className={styles.mngEnvKeyButton}>
|
||||
<svg
|
||||
@@ -72,33 +77,62 @@ const TopHeader = (props) => {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
<div className={styles.button}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M10 4.41016V15.5907"
|
||||
stroke="currentColor"
|
||||
strokeOpacity={1}
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M4.41016 10H15.5907"
|
||||
stroke="currentColor"
|
||||
strokeOpacity={1}
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
<p>{props.buttonText}</p>
|
||||
</div>
|
||||
{!props.state && (
|
||||
<div className={styles.button} onClick={handleNavigateToAdd}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M10 4.41016V15.5907"
|
||||
stroke="currentColor"
|
||||
strokeOpacity={1}
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M4.41016 10H15.5907"
|
||||
stroke="currentColor"
|
||||
strokeOpacity={1}
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
<p>{props.buttonText}</p>
|
||||
</div>
|
||||
)}
|
||||
{props.state === "add" ? (
|
||||
<>
|
||||
<div className={styles.button}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={20}
|
||||
height={20}
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M4.53125 10L8.4375 13.9062L16.25 6.09375"
|
||||
stroke="white"
|
||||
strokeWidth={1.5}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
<p>{props.buttonText}</p>
|
||||
</div>
|
||||
<div className={styles.cancelButton} onClick={() => router.back()}>
|
||||
<p>{props.cancelButtonText}</p>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user