mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
media page link with mediaToken
This commit is contained in:
1 parent
89bdf04528
commit
8f87522fb4
2 files changed
+13
-2
No files matched your search
@@ -1,15 +1,26 @@
|
||||
import { faArrowRightArrowLeft } from "@fortawesome/pro-solid-svg-icons";
|
||||
import { BucketConfig } from "@storyteller/components/src/api/BucketConfig";
|
||||
import { Button, Container, Panel } from "components/common";
|
||||
import FileInput from "components/common/FileInput";
|
||||
import PageHeader from "components/layout/PageHeader";
|
||||
import { useFile } from "hooks";
|
||||
import { useFile, useMedia } from "hooks";
|
||||
import React from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
interface FbxToGltfPageProps {}
|
||||
|
||||
export default function FbxToGltfPage(props: FbxToGltfPageProps) {
|
||||
const { mediaToken } = useParams<{ mediaToken: string }>();
|
||||
const { media } = useMedia({ mediaToken });
|
||||
const fileProps = useFile({});
|
||||
|
||||
let fileBucketPath = new BucketConfig().getGcsUrl(media?.public_bucket_path);
|
||||
|
||||
if (mediaToken) {
|
||||
//sets media file
|
||||
fileProps.blob = fileBucketPath;
|
||||
}
|
||||
|
||||
return (
|
||||
<Container type="panel">
|
||||
<PageHeader
|
||||
|
||||
@@ -129,7 +129,7 @@ export default function MediaPage() {
|
||||
<Button
|
||||
icon={faArrowRightArrowLeft}
|
||||
label="Convert FBX to glTF"
|
||||
to="/fbx-to-gltf"
|
||||
to={`/fbx-to-gltf/${mediaFile.token}`}
|
||||
variant="primary"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user