Skip to content
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

website / Fix broken links, slow loading, and prod errors #5932

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Fix
  • Loading branch information
FelixMalfait committed Jun 18, 2024
commit f8a2c028e82a9e276f0e347b8d7b218e45841310
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import React, { useState } from 'react';
import styled from '@emotion/styled';
import Image from 'next/image';
import { usePathname } from 'next/navigation';

import { ArticleContent } from '@/app/_components/ui/layout/articles/ArticleContent';
Expand Down Expand Up @@ -111,7 +112,7 @@ const StyledImageContainer = styled.div<{ loaded: string }>`
`}
`;

const StyledImage = styled(img)<{ loaded: string }>`
const StyledImage = styled(Image)<{ loaded: string }>`
opacity: ${({ loaded }) => (loaded === 'true' ? 1 : 0)};
transition: opacity 250ms ease-in-out;
`;
Expand Down Expand Up @@ -148,6 +149,7 @@ export default function DocsContent({ item }: { item: FileContent }) {
style={{ objectFit: 'cover' }}
onLoad={() => setImageLoaded(true)}
loaded={imageLoaded.toString()}
unoptimized
/>
)}
</StyledImageContainer>
Expand Down
Loading