Update imports and Electron compatibility
- Removed unnecessary React imports. - Adjusted package.json scripts for Electron integration. - Updated components to replace Next.js-specific imports with Electron-compatible alternatives. - Minor tsconfig.json changes for better compatibility.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, {JSX, useEffect, useRef, useState} from 'react';
|
||||
import {JSX, useEffect, useMemo, useRef, useState} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faXmark} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
@@ -189,7 +189,7 @@ export default function GuideTour({stepId, steps, onClose, onComplete}: GuideTou
|
||||
const [isVisible, setIsVisible] = useState<boolean>(false);
|
||||
const [rendered, setRendered] = useState<boolean>(false);
|
||||
|
||||
const filteredSteps: GuideStep[] = React.useMemo((): GuideStep[] => {
|
||||
const filteredSteps: GuideStep[] = useMemo((): GuideStep[] => {
|
||||
return steps.filter((step: GuideStep): boolean => step.id >= stepId);
|
||||
}, [steps, stepId]);
|
||||
|
||||
@@ -309,7 +309,7 @@ function GuidePopup(
|
||||
onNext: () => void;
|
||||
onClose: () => void;
|
||||
}): JSX.Element {
|
||||
const positionStyle = React.useMemo(() => {
|
||||
const positionStyle = useMemo(() => {
|
||||
return getPopoverPosition(step);
|
||||
}, [step]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user