Skip to content

Commit

Permalink
Merge branch 'master' into hflatval/react-query-refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
Savokr authored Aug 2, 2023
2 parents b7980fd + aeb0205 commit d61739f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@ export type ViewerAnchorElementMapping = {
export type ViewerAnchorProps = {
position: Vector3;
children: ReactElement;
uniqueKey: string;
};

export const ViewerAnchor = ({
position,
children,
uniqueKey
}: ViewerAnchorProps): ReactElement => {
export const ViewerAnchor = ({ position, children }: ViewerAnchorProps): ReactElement => {
const viewer = useReveal();
const [divTranslation, setDivTranslation] = useState(new Vector2());
const [visible, setVisible] = useState(false);
Expand Down Expand Up @@ -50,7 +45,6 @@ export const ViewerAnchor = ({

return visible ? (
<div
key={uniqueKey}
ref={htmlRef}
style={{
position: 'absolute',
Expand Down
4 changes: 2 additions & 2 deletions react-components/stories/ViewerAnchor.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Main: Story = {
styling={styling}
fdmAssetMappingConfig={fdmAssetMappingConfig}
/>
<ViewerAnchor position={position} uniqueKey="key2">
<ViewerAnchor position={position}>
<p
style={{
backgroundColor: 'turquoise',
Expand All @@ -62,7 +62,7 @@ export const Main: Story = {
This label is stuck at position {position.toArray().join(',')}
</p>
</ViewerAnchor>
<ViewerAnchor position={position2} uniqueKey="key1">
<ViewerAnchor position={position2}>
<p
style={{
backgroundColor: 'red',
Expand Down

0 comments on commit d61739f

Please sign in to comment.