-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Style variant list * move border
- Loading branch information
Showing
7 changed files
with
71 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -455,3 +455,4 @@ $RECYCLE.BIN/ | |
!.vscode/extensions.json | ||
|
||
*.[Ll]ocal.json | ||
frontend/.prettierrc |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
import { VariantList } from "../components/variants"; | ||
"use client"; | ||
import VariantListElement from "@/components/variantListElement"; | ||
import useVibesApi from "@/hooks/useVibesApi"; | ||
import { CircularProgress } from "@mui/material"; | ||
|
||
export default function Page() { | ||
export default function Bemanning() { | ||
const { data, isLoading } = useVibesApi(true); | ||
|
||
return <VariantList /> | ||
} | ||
if (isLoading) { | ||
return <CircularProgress />; | ||
} | ||
|
||
if (data) { | ||
return ( | ||
<div> | ||
<h1>Konsulenter</h1> | ||
|
||
<p className="body-large-bold pt-16 pb-4">Konsulentliste</p> | ||
{data.map((variant) => ( | ||
<VariantListElement key={variant.id} variant={variant} /> | ||
))} | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"use client"; | ||
import { Variant } from "@/types"; | ||
import { useState } from "react"; | ||
|
||
interface VariantListElementProps { | ||
variant: Variant; | ||
} | ||
|
||
const VariantListElement = ({ variant }: VariantListElementProps) => { | ||
const [isListElementVisible, setIsListElementVisible] = useState(false); | ||
|
||
const toggleListElementVisibility = () => { | ||
setIsListElementVisible(!isListElementVisible); | ||
}; | ||
|
||
return ( | ||
<div | ||
className={`flex flex-col ${ | ||
isListElementVisible && "bg-primary_l4" | ||
} border-t-2 border-primary_l4 `} | ||
> | ||
<button | ||
className="flex flex-row gap-6 p-3 hover:bg-primary_default hover:bg-opacity-5" | ||
onClick={toggleListElementVisibility} | ||
> | ||
<div className={`w-6 h-6 m-3 ${isListElementVisible && "rotate-180"}`}> | ||
<img src="icons/chevron-down.svg" alt="chevron-down" className="" /> | ||
</div> | ||
<div className="flex flex-col gap-1 justify-center items-start"> | ||
<p className="body text-black"> {variant.name}</p> | ||
<p className="detail text-neutral_l1">{variant.email}</p> | ||
</div> | ||
</button> | ||
<div className={`${!isListElementVisible && "hidden"} h-[198px] `}></div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default VariantListElement; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters