Skip to content

Commit 305c690

Browse files
committed
fixed vide breaking change
1 parent 844ed4e commit 305c690

File tree

1 file changed

+5
-4
lines changed
  • src/UI/StoryPreview/PreviewController/Mounters/VideLib

1 file changed

+5
-4
lines changed

src/UI/StoryPreview/PreviewController/Mounters/VideLib/index.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ConvertedControls, ReturnControls } from "@rbxts/ui-labs/src/ControlTyp
44
import { useControls, useParametrizedControls, useStoryActionComponents, useStoryPassedProps } from "../Hooks";
55
import { CreateVideScopes, UpdateVideScopes } from "./Utils";
66
import { useUpdateEffect } from "@rbxts/pretty-react-hooks";
7-
import { InferVideProps } from "@rbxts/ui-labs";
7+
import { InferVideControls, InferVideProps } from "@rbxts/ui-labs";
88
import { useStoryUnmount } from "../../Utils";
99

1010
function VideLib(props: MounterProps<"VideLib">) {
@@ -22,10 +22,11 @@ function VideLib(props: MounterProps<"VideLib">) {
2222
const GetProps = useStoryPassedProps();
2323

2424
const [sources, sourcesCleanup] = useMemo(() => {
25-
return vide.root((cleanup) => {
26-
const returnSources = CreateVideScopes(vide, controls, controlValues);
27-
return [returnSources, cleanup];
25+
let gotSources: InferVideControls<ConvertedControls> = {};
26+
const cleanup = vide.mount(() => {
27+
gotSources = CreateVideScopes(vide, controls, controlValues);
2828
});
29+
return [gotSources, cleanup];
2930
}, []);
3031

3132
useUpdateEffect(() => {

0 commit comments

Comments
 (0)