Fetch user projects

Endpoint

https://developer.thefullstack.network/api/v1/projects/:displayName

Example request

import useSWR from "swr";
import fetcher from "utils/fetcher";
 
const Projects = () => {
  const url = `/api/v1/projects/danoely`;
  const { data } = useSWR(url, fetcher);
 
  return data.map((project, index) => (
    <div key={index}>{project.title} ...</div>
  ));
};
 
export default Projects;

Example response

[
  {
    "title": "My project name",
    "cover_image": "https://image.mux.com/VQQF2V7R2sPxDlt017Mt4P01DsAjUrJMvU02euG6ZldLUw/animated.gif",
    "cover_video": "https://stream.mux.com/VQQF2V7R2sPxDlt017Mt4P01DsAjUrJMvU02euG6ZldLUw.m3u8",
    "project_repo": "https://github.com/danoely1979/nextjs-firestore-chat",
    "project_link": "https://nextjs-firestore-chat.vercel.app",
    "content_preview": "The chat system we used to have in place here on thefullstack was ChatEngine.io. It was a quick and cheap enough solution to get us up and running. We had tried SendBird and others, but quickly realised it was not worth the expense at this stage, and so we went with ChatEngine. However, we had a lot of stability and UX issues with it, and then later found out the creator of ChatEngine was gonna have to shut down the service and close business. (He has since raised funds and is back in operation)",
    "content_body": "The chat system we used to have in place here on thefullstack was ChatEngine.io. It was a quick and cheap enough solution to get us up and running. We had tried SendBird and others, but quickly realised it was not worth the expense at this stage, and so we went with ChatEngine. However, we had a lot of stability and UX issues with it, and then later found out the creator of ChatEngine was gonna have to shut down the service and close business. (He has since raised funds and is back in operation).\n\nWe went back out looking for a replacement chat solution again. We needed a simple chat solution. Most providers we found were just too high cost (anywhere between $400-$600 dollars per month). Upon reading a great post here from **[@gyanendraknojiya](/gyanendraknojiya)** on reactjs chat application and finding other resources about building on top of Firestore, we decided \"well hey, we are devs ourselves\", so we built one that satisfied our criteria for right now. It took a full 3 hours to put together - start to finish, and we now had the chatapp replacement. And this time round with zero cost, 10x better stability and full control over UI / UX, etc. with whatever features are needed.\n\nSo this project is it.\n\nIt's a stripped down version of the chat feature that is implemented here on thefullstack.network. As this is an example repo, I removed any restrictions and encryption rules that are in place on thefullstack chat implementation. I kept this repo simple, so whilst Tailwind is a dependency, this example version doesn't cater for responsiveness or dark mode, etc. Most of which should be straight forward to cover off using Tailwind.\n\nHope it makes sense. Comment for any suggestions, improvements or connect with me if you want help with it for any of your own projects that need chat functionality.\n\nAll credit due to [this tutorial](https://www.youtube.com/watch?v=i8YFPPx_BYw) and [this post](https://thefullstack.network/gyanendraknojiya/create-a-real-time-chat-application-using-react-js-and-firebase) from **[@gyanendraknojiya](/gyanendraknojiya)** ",
    "slug": "nextjs-firestore-chat",
    "url": "https://thefullstack.network/danoely/project/nextjs-firestore-chat",
    "tags": ["React", "Firebase", "Tailwind CSS"],
    "upvotes_count": 23,
    "comments_count": 4,
    "awards_count": 23,
    "open_to_collaboration": false,
    "author": {
      "name": "Noel Maher",
      "avatar": "https://terrabyte.fra1.digitaloceanspaces.com/avatars/google-oauth2%7C110889799112459409416/profile-google-oauth2%7C110889799112459409416-noel.jpeg"
    },
    "created_at": "2022-06-16T11:31:58.663+00:00"
  },
  ...
]