Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fix/fxa-rebrand-language-change
Browse files Browse the repository at this point in the history
  • Loading branch information
jpezninjo authored Oct 3, 2023
2 parents 528dabd + 9de65dd commit 456ff13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions components/timeline/TimelineDiscover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ function shorten(str: string, maxLen: number): string {
function updateUTM(url: string): string {
return url.replace('pocket-newtab', 'mozilla')
}
const clipboard = useClipboard()
async function copyLink(url, event) {
event.preventDefault()
if (url)
await clipboard.copy(url)
}
</script>

<template>
Expand Down Expand Up @@ -48,6 +55,11 @@ function updateUTM(url: string): string {
</div>
<div class="media" relative overflow-hidden max-w-120px min-w-120px>
<img :src="item.imageUrl" rounded-lg overflow-hidden w-full ha>
<div m-y-4px flex flex-justify-end>
<button p-12px text-xl @click="copyLink(updateUTM(item.url), $event)">
<div i-ri:share-line />
</button>
</div>
</div>
</NuxtLink>
</template>
Expand Down
2 changes: 1 addition & 1 deletion server/api/[server]/recommendations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default defineEventHandler(async (event) => {
const { locale } = getQuery(event)

const recommendations = await fetch(
`https://firefox-api-proxy.readitlater.com/desktop/v1/recommendations?consumer_key=moso-web-dev&locale=${locale}`,
`https://mozilla.social/content-feed/moso/v1/discover?locale=${locale}`,
)
.then(response => response.json())
.then(response => response.data)
Expand Down

0 comments on commit 456ff13

Please sign in to comment.