Skip to content

Commit

Permalink
chore: fix mage in getStaticMetaFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei0x309 committed Sep 18, 2024
1 parent 45168be commit a6b0ad6
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 39 deletions.
6 changes: 4 additions & 2 deletions apps/yup-live/src/pages/changeLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import { useHead } from "@unhead/vue";
import { changes } from "shared/src/utils/changeLog";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const BASE_URL = import.meta.env.VITE_BASE_URL;
const siteData = {
title: `Yup Live ChangeLog`,
description: `Sumary of changes to yup live, all code is open source and available on github`,
Expand All @@ -72,9 +74,9 @@ useHead({
},
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-changelog.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-changelog.png`,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-changelog.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-changelog.png`),
],
});
Expand Down
6 changes: 4 additions & 2 deletions apps/yup-live/src/pages/custom-error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import { getStaticMetaFrame } from "shared/src/utils/frame";
import { useRoute, useRouter } from "vue-router";
const BASE_URL = import.meta.env.VITE_BASE_URL;
export default defineComponent({
name: "ErrorPage",
components: {},
Expand Down Expand Up @@ -96,9 +98,9 @@ export default defineComponent({
},
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
Expand Down
6 changes: 4 additions & 2 deletions apps/yup-live/src/pages/emissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ import { useMainStore } from "@/store/main";
import { useRoute } from "vue-router";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const BASE_URL = import.meta.env.VITE_BASE_URL;
export default defineComponent({
name: "EmissionsPage",
components: {
Expand Down Expand Up @@ -100,7 +102,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
{
name: "description",
Expand Down Expand Up @@ -138,7 +140,7 @@ export default defineComponent({
name: "twitter:description",
content: computed(() => siteData.description).value,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
Expand Down
5 changes: 3 additions & 2 deletions apps/yup-live/src/pages/fc-channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ import { searchChannel } from "shared/src/utils/requests/web3-posting";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const API_BASE = import.meta.env.VITE_YUP_API_BASE;
const BASE_URL = import.meta.env.VITE_BASE_URL;
const deps: IPostDeps = {
stackAlertError,
Expand Down Expand Up @@ -164,7 +165,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-feeds.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-feeds.png`,
},
{
name: "description",
Expand Down Expand Up @@ -202,7 +203,7 @@ export default defineComponent({
name: "twitter:description",
content: siteData.description,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-feeds.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-feeds.png`),
],
});
Expand Down
5 changes: 3 additions & 2 deletions apps/yup-live/src/pages/feeds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ import DeleteIcon from "icons/src/delete.vue";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const API_BASE = import.meta.env.VITE_YUP_API_BASE;
const BASE_URL = import.meta.env.VITE_BASE_URL;
const deps: IPostDeps = {
stackAlertError,
Expand Down Expand Up @@ -355,7 +356,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-feeds.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-feeds.png`,
},
{
name: "description",
Expand Down Expand Up @@ -393,7 +394,7 @@ export default defineComponent({
name: "twitter:description",
content: siteData.description,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-feeds.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-feeds.png`),
],
});
Expand Down
6 changes: 4 additions & 2 deletions apps/yup-live/src/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import { useMainStore, openConnectModal } from "@/store/main";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const BASE_URL = import.meta.env.VITE_BASE_URL;
export default defineComponent({
name: "HomePage",
components: {
Expand Down Expand Up @@ -130,7 +132,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
{
name: "description",
Expand Down Expand Up @@ -168,7 +170,7 @@ export default defineComponent({
name: "twitter:description",
content: computed(() => siteData.description).value,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
Expand Down
6 changes: 4 additions & 2 deletions apps/yup-live/src/pages/meetings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ import { useHead } from "@unhead/vue";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const BASE_URL = import.meta.env.VITE_BASE_URL;
export default defineComponent({
name: "MeetingRecordings",
components: {
Expand Down Expand Up @@ -154,7 +156,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `$/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
{
name: "description",
Expand Down Expand Up @@ -192,7 +194,7 @@ export default defineComponent({
name: "twitter:description",
content: siteData.description,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
Expand Down
6 changes: 4 additions & 2 deletions apps/yup-live/src/pages/notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ import { useMainStore } from "@/store/main";
import { router } from "@/router";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const BASE_URL = import.meta.env.VITE_BASE_URL;
export default defineComponent({
name: "Notifications",
components: {
Expand Down Expand Up @@ -187,7 +189,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
{
name: "description",
Expand Down Expand Up @@ -225,7 +227,7 @@ export default defineComponent({
name: "twitter:description",
content: computed(() => siteData.description).value,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});

Expand Down
5 changes: 3 additions & 2 deletions apps/yup-live/src/pages/postDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ import BlueSkyIcon from "icons/src/bsky.vue";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const API_BASE = import.meta.env.VITE_YUP_API_BASE;
const BASE_URL = import.meta.env.VITE_BASE_URL;
const postDeps: IPostDeps = {
stackAlertError,
Expand Down Expand Up @@ -188,7 +189,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
{
name: "description",
Expand Down Expand Up @@ -226,7 +227,7 @@ export default defineComponent({
name: "twitter:description",
content: computed(() => siteData.description),
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
} as unknown) as Ref<HeadObject>);
Expand Down
7 changes: 5 additions & 2 deletions apps/yup-live/src/pages/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ import {
import { getStaticMetaFrame } from "shared/src/utils/frame";

const API_BASE = import.meta.env.VITE_YUP_API_BASE;
const BASE_URL = import.meta.env.VITE_BASE_URL;

const postDeps: IPostDeps = {
stackAlertError,
Expand Down Expand Up @@ -431,7 +432,7 @@ export default defineComponent({
},
{
name: "og:image",
content: `share/yup-live-ogs/og-yup-live-web3-profile.png`,
content: `${BASE_URL}share/yup-live-ogs/og-yup-live-web3-profile.png`,
},
{
name: "twitter:card",
Expand All @@ -453,7 +454,9 @@ export default defineComponent({
name: "twitter:image",
content: `/share/yup-live-ogs/og-yup-live-web3-profile.png`,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-web3-profile.png`),
...getStaticMetaFrame(
`${BASE_URL}/share/yup-live-ogs/og-yup-live-web3-profile.png`
),
],
});

Expand Down
19 changes: 6 additions & 13 deletions apps/yup-live/src/pages/reward-claim.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,6 @@ export default defineComponent({
const siteData = reactive({
title: `Yup Content rewards claim`,
description: `Interact with the Yup content rewards contracts.`,
meta: [
{
name: "description",
content: `Interact with the Yup content rewards contracts.`,
},
{
name: "og:image",
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
onUnmounted(() => {
Expand All @@ -271,8 +259,13 @@ export default defineComponent({
meta: [
{
name: "description",
content: computed(() => siteData.description).value,
content: `Interact with the Yup content rewards contracts.`,
},
{
name: "og:image",
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
Expand Down
5 changes: 3 additions & 2 deletions apps/yup-live/src/pages/team-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import ActiveUsers from "./team/active-users.vue";
import { getStaticMetaFrame } from "shared/src/utils/frame";
const API_BASE = import.meta.env.VITE_YUP_API_BASE;
const BASE_URL = import.meta.env.VITE_BASE_URL;
const deps: IPostDeps = {
stackAlertError,
Expand Down Expand Up @@ -142,7 +143,7 @@ export default defineComponent({
meta: [
{
name: "og:image",
content: `/share/yup-live-ogs/og-yup-live-default.png`,
content: `${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`,
},
{
name: "description",
Expand Down Expand Up @@ -180,7 +181,7 @@ export default defineComponent({
name: "twitter:description",
content: siteData.description,
},
...getStaticMetaFrame(`/share/yup-live-ogs/og-yup-live-default.png`),
...getStaticMetaFrame(`${BASE_URL}/share/yup-live-ogs/og-yup-live-default.png`),
],
});
Expand Down
8 changes: 4 additions & 4 deletions packages/shared/src/utils/frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const getStaticMetaFrame = (image: string) => {
},
{
"name": "fc:frame:image",
"content": "https://moxie-frames.airstack.xyz/MoxieBalance/starting.png?v=1"
"content": image
},
{
"name": "fc:frame:post_url",
"content": "https://moxie-frames.airstack.xyz/mb/frame?r="
"content": 'https://yup.live'
},
{
"name": "fc:frame:image:aspect_ratio",
Expand Down Expand Up @@ -49,8 +49,8 @@ export const getStaticMetaFrame = (image: string) => {
"content": "link"
},
{
"name": "fc:frame:button:2:target",
"content": "https://warpcast.com/?composerActionURL=https://yup.live"
"name": "fc:frame:button:3:target",
"content": `https://warpcast.com/?composerActionURL=${encodeURIComponent('https://yup.live')}`
},
] as { name: string, content: string }[];
return meta;
Expand Down

0 comments on commit a6b0ad6

Please sign in to comment.