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

README: Image and FeaturedImage should be of type url in notion. #46

Open
jmunozz opened this issue Feb 6, 2024 · 0 comments
Open

README: Image and FeaturedImage should be of type url in notion. #46

jmunozz opened this issue Feb 6, 2024 · 0 comments

Comments

@jmunozz
Copy link

jmunozz commented Feb 6, 2024

The readme says Image and FeaturedImage should be of type text but the code seems to say otherwise.

export const FeaturedPostItem: React.FC<{ post: PostProps }> = ({ post }) => {
  const formattedDate = useMemo(
    () =>
      dayjs(new Date(post.properties.Date.date.start)).format("MMM D, YYYY"),
    [post.properties.Date.date.start]
  );

  const author = post.properties.Authors.people[0];
  const category = post.properties.Category.select?.name;
  const featuredImage = post.properties.FeaturedImage.url;

Once I have changed type of FeaturedImage from text to url in my notion db, it started to display on my blog.
I suggest just update the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant