Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
righ committed Nov 12, 2024
1 parent 496a76a commit 68f1f48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/components/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const Cell: React.FC<Props> = React.memo(({ y, x, operationStyle }) => {
const rect = cellRef.current?.getBoundingClientRect();
const outerRect = gridOuterRef.current?.getBoundingClientRect();
if (
rect && outerRect &&
rect &&
outerRect &&
rect.top < outerRect.bottom &&
rect.bottom > outerRect.top &&
rect.left < outerRect.right &&
Expand Down
6 changes: 3 additions & 3 deletions src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import { Mode } from '../types';

type Props = {
mode?: Mode;
}
};

export const Editor: React.FC<Props> = ({mode}: Props) => {
export const Editor: React.FC<Props> = ({ mode }: Props) => {
const { store, dispatch } = React.useContext(Context);

const {
Expand Down Expand Up @@ -385,7 +385,7 @@ export const Editor: React.FC<Props> = ({mode}: Props) => {
};

return createPortal(
<div
<div
className={`gs-editor ${editing ? 'gs-editing' : ''}`}
data-mode={mode || 'light'}
data-sheet-id={sheetId}
Expand Down
8 changes: 3 additions & 5 deletions src/components/FormulaBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,12 @@ export const FormulaBar: React.FC = () => {
return;
}
hlRef.current.style.height = `${largeEditorRef.current.clientHeight}px`;
hlRef.current.scrollLeft = largeEditorRef.current!.scrollLeft;
hlRef.current.scrollTop = largeEditorRef.current!.scrollTop;
hlRef.current.scrollLeft = largeEditorRef.current.scrollLeft;
hlRef.current.scrollTop = largeEditorRef.current.scrollTop;
};

return (
<label
className="gs-formula-bar"
>
<label className="gs-formula-bar">
<div className="gs-selecting-address">{address}</div>
<div className="gs-fx">Fx</div>
<div className="gs-formula-bar-editor-inner">
Expand Down
1 change: 0 additions & 1 deletion src/components/Tabular.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { createPortal } from 'react-dom';

import { Cell } from './Cell';
import { HeaderCellTop } from './HeaderCellTop';
Expand Down

0 comments on commit 68f1f48

Please sign in to comment.