Skip to content

Commit 6362561

Browse files
fix light ref
1 parent 1d6be48 commit 6362561

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

frontend/three_d_garden/components.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ export const AmbientLight = (props: ThreeElements["ambientLight"]) =>
88
// @ts-expect-error Property does not exist on type JSX.IntrinsicElements
99
<ambientLight {...props} />;
1010

11-
export const DirectionalLight = (props: ThreeElements["directionalLight"]) =>
12-
// @ts-expect-error Property does not exist on type JSX.IntrinsicElements
13-
<directionalLight {...props} />;
11+
export const DirectionalLight =
12+
React.forwardRef((props: ThreeElements["directionalLight"], ref) =>
13+
// @ts-expect-error Property does not exist on type JSX.IntrinsicElements
14+
<directionalLight ref={ref} {...props} />);
1415

1516
export const Group = React.forwardRef((props: ThreeElements["group"], ref) =>
1617
// @ts-expect-error Property does not exist on type JSX.IntrinsicElements

0 commit comments

Comments
 (0)