Skip to content

Commit

Permalink
[easy] remove unused ref in ExpandableCallout.tsx (reactjs#6755)
Browse files Browse the repository at this point in the history
Note that this component is not actually expandable and the ref got likely unused when that was removed
  • Loading branch information
kassens authored Apr 15, 2024
1 parent 2749eb4 commit 56ca8f1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/MDX/ExpandableCallout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Copyright (c) Facebook, Inc. and its affiliates.
*/

import {useRef} from 'react';
import * as React from 'react';
import cn from 'classnames';
import {IconNote} from '../Icon/IconNote';
Expand Down Expand Up @@ -63,7 +62,6 @@ const variantMap = {
};

function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) {
const contentRef = useRef<HTMLDivElement>(null);
const variant = variantMap[type];

return (
Expand All @@ -80,9 +78,7 @@ function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) {
{variant.title}
</h3>
<div className="relative">
<div ref={contentRef} className="py-2">
{children}
</div>
<div className="py-2">{children}</div>
</div>
</div>
);
Expand Down

0 comments on commit 56ca8f1

Please sign in to comment.