Skip to content

Commit

Permalink
fixed the bug in deploying sites
Browse files Browse the repository at this point in the history
  • Loading branch information
himohitmehta committed Apr 10, 2024
1 parent 9485c2a commit a119d27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
31 changes: 15 additions & 16 deletions apps/sites/components/blur-image.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
/* eslint-disable jsx-a11y/alt-text */
"use client";

import cn from "clsx";
import Image from "next/image";
import Image, { ImageProps } from "next/image";
import { useState } from "react";

import type { ComponentProps } from "react";

export default function BlurImage(props: ComponentProps<typeof Image>) {
const [isLoading, setLoading] = useState(true);
export default function BlurImage({ props }: { props: ImageProps }) {
const [isLoading, setLoading] = useState(true);

return (
<Image
{...props}
alt={props.alt}
className={cn(
props.className,
"duration-700 ease-in-out",
isLoading ? "scale-105 blur-lg" : "scale-100 blur-0",
)}
onLoadingComplete={() => setLoading(false)}
/>
);
return (
<Image
className={cn(
props.className,
"duration-700 ease-in-out",
isLoading ? "scale-105 blur-lg" : "scale-100 blur-0",
)}
onLoadingComplete={() => setLoading(false)}
{...props}
/>
);
}
2 changes: 1 addition & 1 deletion apps/sites/lib/remark-plugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function replaceLinks({
children,
}: {
href?: string;
children: ReactNode;
children: React.ReactNode;
}) {
// this is technically not a remark plugin but it
// replaces internal links with <Link /> component
Expand Down

0 comments on commit a119d27

Please sign in to comment.