chore/AppStore: Remove deprecated imageSrc and make the paths relative in logo (#8479)

* Remove depreated imageSrc and make the paths relative in logo

* Do logo replacement at a single place

* Make logo relative at other places

* Fix campfire page not working in dev environment
This commit is contained in:
Hariom Balhara authored and GitHub committed 2023-04-26 12:03:34 +01:00
1 parent 543466f1b9
commit 51695ee79d
103 files changed
+210 -253

No files matched your search

+6 -3
View File
@@ -6,6 +6,7 @@ import path from "path";
import { z } from "zod";
import { getAppWithMetadata } from "@calcom/app-store/_appRegistry";
import { getAppAssetFullPath } from "@calcom/app-store/getAppAssetFullPath";
import prisma from "@calcom/prisma";
import type { inferSSRProps } from "@lib/types/inferSSRProps";
@@ -108,9 +109,11 @@ export const getStaticProps = async (ctx: GetStaticPropsContext) => {
const { content, data } = sourceSchema.parse({ content: result.content, data: result.data });
if (data.items) {
data.items = data.items.map((item) => {
if (typeof item === "string" && !item.includes("/api/app-store")) {
// Make relative paths absolute
return `/api/app-store/${appDirname}/${item}`;
if (typeof item === "string") {
return getAppAssetFullPath(item, {
dirName: singleApp.dirName,
isTemplate: singleApp.isTemplate,
});
}
return item;
});