-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Initialize API v1 for Ingredients * feat(i18n): Added translations for tooltip * feat(SCSS): Upgraded to newer SCSS version
- Loading branch information
1 parent
7aa9a50
commit 9cbaade
Showing
42 changed files
with
638 additions
and
405 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"private": true, | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"dev": "next dev --turbopack", | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start -p 1030", | ||
"stage": "next start -p 1031", | ||
|
@@ -25,7 +25,7 @@ | |
"dependencies": { | ||
"@ducanh2912/next-pwa": "^10.2.9", | ||
"@ericblade/quagga2": "^1.8.4", | ||
"@frontendnetwork/veganify": "^1.2.9", | ||
"@frontendnetwork/veganify": "^1.3.0", | ||
"@types/node": "22.8.1", | ||
"@types/react-dom": "npm:[email protected]", | ||
"jest-worker": "^29.7.0", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,10 @@ | ||
export type IconClassType = | ||
| "vegan icon-ok" | ||
| "non-vegan icon-cancel" | ||
| "unknown-vegan icon-help" | ||
| "maybe-vegan icon-attention-alt"; | ||
|
||
export interface TooltipMessages { | ||
"maybe-vegan": string; | ||
"unkown-vegan": string; | ||
} |
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,4 @@ | ||
export type TranslationFunction = ( | ||
key: string, | ||
values?: Record<string, string> | ||
) => string; |
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 @@ | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
|
||
interface TooltipProps { | ||
message: string; | ||
children: React.ReactNode; | ||
} | ||
|
||
export function TooltipClient({ message, children }: TooltipProps) { | ||
const [isVisible, setIsVisible] = useState(false); | ||
|
||
if (!message) { | ||
return children; | ||
} | ||
|
||
return ( | ||
<div | ||
className="tooltip-wrapper" | ||
onMouseEnter={() => setIsVisible(true)} | ||
onMouseLeave={() => setIsVisible(false)} | ||
> | ||
{children} | ||
{isVisible && ( | ||
<div className="tooltip"> | ||
{message} | ||
<div className="tooltip-arrow"></div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |
Oops, something went wrong.