Skip to content

Commit

Permalink
remove unused refs
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanJablo committed Jan 20, 2025
1 parent 0f1690c commit 8ab088d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions packages/lexical-playground/src/nodes/PollComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export default function PollComponent({
const [isSelected, setSelected, clearSelection] =
useLexicalNodeSelection(nodeKey);
const [selection, setSelection] = useState<BaseSelection | null>(null);
const ref = useRef(null);

const $onDelete = useCallback(
(payload: KeyboardEvent) => {
Expand Down Expand Up @@ -202,9 +201,7 @@ export default function PollComponent({
const isFocused = $isNodeSelection(selection) && isSelected;

return (
<div
className={`PollNode__container ${isFocused ? 'focused' : ''}`}
ref={ref}>
<div className={`PollNode__container ${isFocused ? 'focused' : ''}`}>
<div className="PollNode__inner">
<h2 className="PollNode__heading">{question}</h2>
{options.map((option, index) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
KEY_DELETE_COMMAND,
} from 'lexical';
import * as React from 'react';
import {ReactNode, useCallback, useEffect, useRef} from 'react';
import {ReactNode, useCallback, useEffect} from 'react';

type Props = Readonly<{
children: ReactNode;
Expand All @@ -49,7 +49,6 @@ export function BlockWithAlignableContents({

const [isSelected, setSelected, clearSelection] =
useLexicalNodeSelection(nodeKey);
const ref = useRef(null);

const $onDelete = useCallback(
(event: KeyboardEvent) => {
Expand Down Expand Up @@ -119,7 +118,6 @@ export function BlockWithAlignableContents({
className={[className.base, isSelected ? className.focus : null]
.filter(Boolean)
.join(' ')}
ref={ref}
style={{
textAlign: format ? format : undefined,
}}>
Expand Down

0 comments on commit 8ab088d

Please sign in to comment.