Skip to content

Commit b4e9092

Browse files
Silent img warning and fix button error
1 parent dfeab82 commit b4e9092

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

components/buttons/button.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client"
2-
import { Button as _Button, Link } from "@heroui/react"
2+
import { Button as _Button, Link, type ButtonProps as HeroUIButtonProps, type PressEvent } from "@heroui/react"
33
import { LinkIcon } from "@heroicons/react/24/outline"
44
import { defaultIconSize } from "@/components/icons/icon"
55

@@ -11,7 +11,12 @@ const buttonClassNames = "min-w-[100px] bg-root-primary p-3 text-white"
1111
* @param className CSS-klassen til knappen
1212
* @param props Props som skal sendes til button-elementet, blant annet onClick, disabled, etc.
1313
*/
14-
export const Button: Component<ButtonProps> = ({ children, className, ...props }) => (
14+
15+
type RootButtonProps = HeroUIButtonProps & {
16+
onPress?: (e: PressEvent) => void
17+
}
18+
19+
export const Button: Component<RootButtonProps> = ({ children, className, ...props }) => (
1520
<_Button radius={"lg"} className={`${buttonClassNames} ${className}`} {...props}>
1621
{children}
1722
</_Button>

components/imageViewer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const ImageViewer = ({ image }: { image?: SanityImageObject }) => {
1818

1919
if (isSVG) {
2020
return (
21+
// eslint-disable-next-line @next/next/no-img-element
2122
<img
2223
src={imageUrl}
2324
alt={image.alt ?? ""}

0 commit comments

Comments
 (0)