-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added avarage weekday pintxo condition
- Loading branch information
1 parent
fa07241
commit 71f77fc
Showing
5 changed files
with
83 additions
and
23 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
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
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,32 @@ | ||
import { Pintxo } from "@/app/constants/types"; | ||
import { getWeekdayPintxoCondition } from "@/app/utils/surfUtils"; | ||
import { getPintxoColor } from "@/app/utils/uiUtils"; | ||
import React from "react"; | ||
|
||
interface WekdayPintxoProps { | ||
pintxo: Pintxo[] | null; | ||
} | ||
function WeekdayPintxoCondition({ pintxo }: WekdayPintxoProps) { | ||
const data = getWeekdayPintxoCondition(pintxo!); | ||
return ( | ||
<div className="flex flex-row justify-between gap-1 items-center mt-6"> | ||
{Object.keys(data).map((key, index) => ( | ||
<div | ||
key={index} | ||
className="flex flex-col justify-center items-center gap-2" | ||
> | ||
<span className="font-body text-sm text-light/50 font-bold"> | ||
{key} | ||
</span> | ||
<div | ||
className={`${getPintxoColor( | ||
data[key] | ||
)} h-4 w-4 rounded-full`} | ||
></div> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
export default WeekdayPintxoCondition; |
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