Commit 1f558f03 authored by Muhammadali's avatar Muhammadali

fixed warnings

parent b37e426d
Pipeline #231 canceled with stages
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "1.0.0", "version": "0.0.1",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
......
...@@ -35,8 +35,8 @@ const DropDownTailwind = ({ reasons, reason, selectFunc }) => { ...@@ -35,8 +35,8 @@ const DropDownTailwind = ({ reasons, reason, selectFunc }) => {
leaveTo='transform opacity-0 scale-95'> leaveTo='transform opacity-0 scale-95'>
<Menu.Items className='absolute left-1 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none'> <Menu.Items className='absolute left-1 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none'>
<div className='py-3 flex flex-col'> <div className='py-3 flex flex-col'>
{reasons.map((value) => ( {reasons.map((value, index) => (
<Menu.Item onClick={() => selectFunc(value)}> <Menu.Item onClick={() => selectFunc(value)} key={index}>
{({ active }) => ( {({ active }) => (
<p <p
className={classNames( className={classNames(
......
...@@ -17,6 +17,7 @@ import DropDownTailwind from '../TailwindComponents/DropDown'; ...@@ -17,6 +17,7 @@ import DropDownTailwind from '../TailwindComponents/DropDown';
import TimerUi from '../TimerUi'; import TimerUi from '../TimerUi';
const WidjetButton = ({ data, onSetDnd }) => { const WidjetButton = ({ data, onSetDnd }) => {
if (!data) {
data = { data = {
iscloud: true, iscloud: true,
number: '4003', number: '4003',
...@@ -27,6 +28,7 @@ const WidjetButton = ({ data, onSetDnd }) => { ...@@ -27,6 +28,7 @@ const WidjetButton = ({ data, onSetDnd }) => {
lefttime: 231461, lefttime: 231461,
reasons: ['free', 'outcalls', 'home', 'totop'], reasons: ['free', 'outcalls', 'home', 'totop'],
}; };
}
if (window?.alovoice_wsphone) { if (window?.alovoice_wsphone) {
data = window.alovoice_wsphone; data = window.alovoice_wsphone;
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"></div> <div id="boxdialer"></div>
</body> </body>
</html> </html>
/** @format */ /** @format */
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; // import ReactDOM from 'react-dom';
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import { Toaster } from 'react-hot-toast'; import { Toaster } from 'react-hot-toast';
import WidjetButton from './components/WidjetButton/index'; import WidjetButton from './components/WidjetButton/index';
import { BoxDialer } from './lib/boxDIaler'; import { BoxDialer } from './lib/boxDIaler';
import './index.css'; import './index.css';
window.BoxDialer = new BoxDialer(); window.BoxDialer = new BoxDialer();
ReactDOM.render(
const container = document.getElementById('boxdialer');
const root = createRoot(container);
root.render(
<React.StrictMode> <React.StrictMode>
<Toaster /> <Toaster />
<WidjetButton /> <WidjetButton />
</React.StrictMode>, </React.StrictMode>,
document.getElementById('app'),
); );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment