Skip to content

Commit

Permalink
chore: remove next image references
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhashrestha committed Sep 30, 2024
1 parent 6c1bebf commit a24ae56
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
5 changes: 2 additions & 3 deletions animata/hero/hero-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from "react";
import Image from "next/image";

import { Button as UIButton } from "@/components/ui/button";
import { cn } from "@/lib/utils";
Expand All @@ -24,10 +23,10 @@ function Button({ children }: { children: React.ReactNode }) {
function ImageWithWave() {
return (
<div className="title-logo relative inline-block self-center md:self-start">
<Image
<img
width={100}
height={100}
src={animataImage}
src={animataImage.src}
className="-top-6 h-10 w-10 translate-y-5 animate-fadeIn fade-in-0 md:-top-10 md:h-16 md:w-16 md:translate-y-0"
alt="Hero image"
/>
Expand Down
10 changes: 5 additions & 5 deletions animata/widget/video-chat.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useState } from "react";
import Image, { StaticImageData } from "next/image";
import { StaticImageData } from "next/image";
import { motion } from "framer-motion";
import {
Circle,
Expand Down Expand Up @@ -58,8 +58,8 @@ function ImageSlot({ minimize, imageSource, imageAlternate }: ImageSlotProps) {
transition={{ duration: 0.5 }}
className={cn(minimize ? "h-48 w-full" : "h-56 w-56")}
>
<Image
src={imageSource}
<img
src={imageSource.src}
alt={imageAlternate}
className={cn("h-full w-full object-cover", minimize ? "rounded-xl" : "rounded-3xl")}
/>
Expand All @@ -74,8 +74,8 @@ function YourImageSlot({ minimize, imageSource, imageAlternate }: ImageSlotProps
transition={{ duration: 0.5 }}
className={cn(minimize ? "absolute bottom-2 right-0 h-20 w-20" : "h-56 w-56")}
>
<Image
src={imageSource}
<img
src={imageSource.src}
alt={imageAlternate}
className={cn("h-full w-full object-cover", minimize ? "rounded-xl" : "rounded-3xl")}
/>
Expand Down
3 changes: 1 addition & 2 deletions components/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";
import { ComponentProps, HTMLAttributes } from "react";
import Image from "next/image";
import Link from "next/link";
import { useMDXComponent } from "next-contentlayer/hooks";
import { NpmCommands, TouchCommands } from "types/unist";
Expand Down Expand Up @@ -126,7 +125,7 @@ const components = {
{...props}
/>
),
Image,
Image: ({ alt, ...props }: ComponentProps<"img">) => <img alt={alt} {...props} />,
Modal,
Callout,
ComponentPreview,
Expand Down
3 changes: 1 addition & 2 deletions components/site-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import Image from "next/image";
import Link from "next/link";
import { usePathname } from "next/navigation";

Expand All @@ -25,7 +24,7 @@ export function SiteFooter() {
</div>
<p className="text-muted-foreground">by</p>
<div className="flex gap-1">
<Image src="/codse.webp" width={24} height={24} alt="codse" />
<img src="/codse.webp" width={24} height={24} alt="codse" />
<span>codse</span>
</div>
<p className="text-muted-foreground"> from</p>
Expand Down

0 comments on commit a24ae56

Please sign in to comment.