Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: moved to default import
Browse files Browse the repository at this point in the history
eddiejaoude committed Oct 19, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2ae3ec8 commit 45aad29
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/FallbackImage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from "react";
import Image from "next/image";

export const FallbackImage = ({ src, alt, fallback = "A A", ...rest }) => {
export default function FallbackImage({ src, alt, fallback = "A A", ...rest }) {
const [imgSrc, setImgSrc] = useState(src);
const fallbackUrl = `https://avatars.dicebear.com/api/initials/${fallback}.svg`;

@@ -13,4 +13,4 @@ export const FallbackImage = ({ src, alt, fallback = "A A", ...rest }) => {
onError={() => setImgSrc(fallbackUrl)}
/>
);
};
}
2 changes: 1 addition & 1 deletion pages/[username].js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import MultiLayout from "../components/layouts/MultiLayout";
import singleUser from "../config/user.json";
import UserLink from "../components/user/UserLink";
import UserMilestone from "../components/user/UserMilestone";
import { FallbackImage } from "../components/FallbackImage";
import FallbackImage from "../components/FallbackImage";
import EventPreview from "../components/events/EventPreview";

export async function getServerSideProps(context) {

0 comments on commit 45aad29

Please sign in to comment.