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,5 +1,5 @@
|
||||
'use client'
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useEffect, useState, useRef} from 'react';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
faCheckCircle,
|
||||
@@ -32,7 +32,7 @@ const bgColorMap = {
|
||||
export default function StaticAlert(
|
||||
{type, message, onClose}: StaticAlertProps) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const onCloseRef = React.useRef(onClose);
|
||||
const onCloseRef = useRef(onClose);
|
||||
|
||||
useEffect(() => {
|
||||
onCloseRef.current = onClose;
|
||||
@@ -107,7 +107,7 @@ export default function StaticAlert(
|
||||
}}
|
||||
></div>
|
||||
</div>
|
||||
<style jsx>{`
|
||||
<style>{`
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.7;
|
||||
|
||||
Reference in New Issue
Block a user