holdex / holdex-venture-studio

https://holdex.io
3 stars 19 forks source link

fix: problem with portfolio article tags #585 #607

Closed ghost closed 1 month ago

ghost commented 1 month ago

Title: Fix Portfolio Article Tags Alignment #585

Description:

This pull request addresses the issue where portfolio article tags are not aligned with cards on the Portfolio page. When clicking on a tag, such as #polygon, the user is taken to an empty page. To fix this, I've updated the +page.svelte and template.pug files in the portfolio directory to programmatically pull tags from the article page.

Changes:

In +page.svelte, I've added a new variable parsedEdges that maps over the edges array and parses each message using the parseMessage function. This allows us to access the parsed messages in the template. In template.pug, I've updated the template to use the parsedEdges variable and display the parsed messages. I've also replaced the hardcoded PortfolioItem components with a dynamic each loop that iterates over the parsedEdges array.

Files Changed:

+page.svelte template.pug

Diff:

// +page.svelte

+ $: parsedEdges = edges.map(edge => parseMessage(edge?.node as Message));

// template.pug

+ <!-- updated template to use parsedEdges variable -->
+ each('parsedEdges as messageNode, index (messageNode.node.id)')
  PortfolioItem(
    isFeatured=false
    communitySlug="{messageNode.communitySlug}"
    messageSlug="{messageNode.messageSlug}"
    title="{messageNode.title}"
    subtitle="{messageNode.subtitle}"
    key="messageNode.node.id"
    hashtags="{JSON.stringify(messageNode.hashtags)}"
  )

Testing:

To test this fix, navigate to the Portfolio page and click on a tag. The page should now display the correct articles associated with that tag.

vercel[bot] commented 1 month ago

@AfzalAli231 is attempting to deploy a commit to the Holdex Accelerator Team on Vercel.

A member of the Team first needs to authorize it.

georgeciubotaru commented 1 month ago

@AfzalAli231 Please follow our developer guidelines here and update the status properly.