mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-12 21:02:14 +00:00
fix share urls
This commit is contained in:
1 parent
7c14fa32ac
commit
4e5dc777bc
2 files changed
+15
-3
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
import { GetWebsite } from "./GetWebsite";
|
||||
|
||||
export const GetWebsiteLink = (rootedPath: string): string => {
|
||||
const website = GetWebsite();
|
||||
if (rootedPath.startsWith("/")) {
|
||||
return `${website.link}${rootedPath}`;
|
||||
} else {
|
||||
return `${website.link}/${rootedPath}`;
|
||||
}
|
||||
};
|
||||
@@ -44,6 +44,7 @@ import { GetMediaFileTitle } from "common/GetMediaFileTitle";
|
||||
import { STYLES_BY_KEY } from "common/StyleOptions";
|
||||
import { faStarShooting } from "@fortawesome/pro-duotone-svg-icons";
|
||||
import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle";
|
||||
import { GetWebsiteLink } from "@storyteller/components/src/env/GetWebsiteLink";
|
||||
|
||||
export default function MediaPage() {
|
||||
const { canAccessStudio, canEditMediaFile, canBanUsers, user } = useSession();
|
||||
@@ -354,9 +355,10 @@ export default function MediaPage() {
|
||||
let downloadLink =
|
||||
activeSlide.url || bucketConfig.getGcsUrl(mediaFile?.public_bucket_path);
|
||||
|
||||
const shareUrl = `https://fakeyou.com/media/${
|
||||
activeSlide.token || mediaFile?.token || ""
|
||||
}`;
|
||||
const sharePath = `/media/${activeSlide.token || mediaFile?.token || ""}`;
|
||||
|
||||
const shareUrl = GetWebsiteLink(sharePath);
|
||||
|
||||
const shareText = "Check out this media on FakeYou.com!";
|
||||
|
||||
if (status < 3)
|
||||
|
||||
Reference in new issue
Block a user