Skip to content

ref: Don't use Image for rewrite #9195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/changelog/header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import Image from 'next/image';

export default function Header({loading}) {
return (
<div className="w-full mx-auto h-96 relative bg-darkPurple">
<div className="relative w-full lg:max-w-7xl mx-auto px-4 lg:px-8 pt-8 grid grid-cols-12 items-center">
<Image
<img
className={`justify-self-center col-span-10 z-20 hidden lg:block ${loading ? 'animate-fade-in-left' : ''}`}
src="/changelog/assets/hero.png"
src="https://docs.sentry.io/changelog/assets/hero.png"
alt="Sentry Changelog"
height={273}
width={450}
Expand Down
15 changes: 5 additions & 10 deletions src/components/changelog/article.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {ReactNode} from 'react';
import Image from 'next/image';

import Date from './date';
import Tag from './tag';
Expand Down Expand Up @@ -31,15 +30,11 @@ export default function Article({
return (
<article className={`bg-white rounded-lg shadow-lg mb-8 ${className}`}>
{image && (
<div className="relative w-full h-64">
<Image
className="object-cover rounded-lg rounded-b-none"
src={image}
fill
alt={title}
sizes="(max-width: 768px) 100vw"
/>
</div>
<img
className="object-cover relative w-full h-64 rounded-lg rounded-b-none"
src={image}
alt={title}
/>
)}
<div className="p-6">
<h3 className="text-3xl text-primary font-semibold mb-2">{title}</h3>
Expand Down