Closed darkterminal closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
metaphore | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 22, 2023 6:34am |
👏 Thank you!!!
📓 What Your Metaphor
My pull request is contains some changes to three files in the codebase of a our application.
In
src/constants/ogimage-rest-generator.js
, a new parametertemplate
has been added to theseoBanner
function. Thetemplate
parameter is assigned a default value of'default'
. This function generates a URL for an Open Graph image for social media sharing, which includes thetitle
andauthor
of a story.In
src/constants/social-handler.js
, a new functiongetTwitterUsername
has been added. This function takes ausername
parameter and fetches data from the GitHub API to get the Twitter username associated with that user. If a Twitter username is found, it is returned (Twitter). Otherwise, theusername
(GitHub) parameter is returned.In
src/pages/stories/[language]/[slug].js
, thegetStaticProps
function has been modified to call thegetTwitterUsername
function and add the returned value to thestoryDetail
object. TheseoBanner
function call in theTheStory
component has been modified to include thetemplate
parameter with a value of'twitter'
. The social media sharing buttons have been modified to include the Twitter username in thetitle
parameter for theTwitterShareButton
component.✔️ Check List (Check all the applicable boxes)
📄 Note to reviewers (write if any)
📷 What Your Punk Signature?