SurPathHub.github.io icon indicating copy to clipboard operation
SurPathHub.github.io copied to clipboard

[FEATURE] Request and display SurPathHub blog post section

Open mkubdev opened this issue 3 years ago • 3 comments

Detailed description

The blog is displaying mocked blog posts 👇

image

We need to implement data fetching from Dev.to and display the real blog posts from the community.

Context

Because we need to update mocked content from the Figma/Next.js migration.

Possible implementation

Use getStaticProps as data fetching strategy.

export const getStaticProps = async () => {
  const res = await fetch("https://dev.to/api/articles?username=surpathhub");
  const data = await res.json();

  return {
    props: {
      data,
    },
  };
};

@vinzvinci Do you already have account for SurPath Hub?

Additional information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

mkubdev avatar Oct 19 '22 13:10 mkubdev

Yes

https://dev.to/surpathhub

vinzvinci avatar Oct 19 '22 15:10 vinzvinci

Yes

https://dev.to/surpathhub

Ok so it's normal that https://dev.to/api/articles?username=surpathhub is empty.

mkubdev avatar Oct 19 '22 15:10 mkubdev

yeah let's put on-hold first xD

vinzvinci avatar Oct 19 '22 15:10 vinzvinci