fix: resolve react-hooks/rules-of-hooks in Annotator
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 31s
Build & Deploy / 🧪 QA (push) Successful in 1m33s
Build & Deploy / 🏗️ Build (push) Successful in 3m6s
Build & Deploy / 🚀 Deploy (push) Successful in 34s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
Build & Deploy / 🔔 Notify (push) Successful in 2s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 31s
Build & Deploy / 🧪 QA (push) Successful in 1m33s
Build & Deploy / 🏗️ Build (push) Successful in 3m6s
Build & Deploy / 🚀 Deploy (push) Successful in 34s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -70,8 +70,6 @@ export function Annotator({ assets = [], onSubmit }: AnnotatorProps) {
|
|||||||
return window.self !== window.top;
|
return window.self !== window.top;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (isExcluded) return null;
|
|
||||||
|
|
||||||
const getSelector = (el: HTMLElement): string => {
|
const getSelector = (el: HTMLElement): string => {
|
||||||
try {
|
try {
|
||||||
return finder(el, {
|
return finder(el, {
|
||||||
@@ -236,6 +234,8 @@ export function Annotator({ assets = [], onSubmit }: AnnotatorProps) {
|
|||||||
const hoveredRect = useMemo(() => hoveredElement?.getBoundingClientRect(), [hoveredElement, updateTick]);
|
const hoveredRect = useMemo(() => hoveredElement?.getBoundingClientRect(), [hoveredElement, updateTick]);
|
||||||
const selectedRect = useMemo(() => selectedElement?.getBoundingClientRect(), [selectedElement, updateTick]);
|
const selectedRect = useMemo(() => selectedElement?.getBoundingClientRect(), [selectedElement, updateTick]);
|
||||||
|
|
||||||
|
if (isExcluded) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="annotator-ui-ignore">
|
<div className="annotator-ui-ignore">
|
||||||
{/* 1. Global Toolbar */}
|
{/* 1. Global Toolbar */}
|
||||||
|
|||||||
Reference in New Issue
Block a user