fix(icon): change the icon, text & only 1 button
This commit is contained in:
@@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import { Button, Typography } from 'antd';
|
import { Button, Typography } from 'antd';
|
||||||
import { resetWA } from '../../api/web-control';
|
import { resetWA } from '../../api/web-control';
|
||||||
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
|
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
|
||||||
|
import { ReloadOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
@@ -10,14 +11,10 @@ const IndexWebControl = memo(function IndexWebControl() {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { setBreadcrumbItems } = useBreadcrumb();
|
const { setBreadcrumbItems } = useBreadcrumb();
|
||||||
|
|
||||||
const [isPlaying, setIsPlaying] = useState(false);
|
const [isPlaying, setIsPlaying] = useState(true);
|
||||||
|
|
||||||
const url = "https://117.102.231.130:9531/qrview";
|
const url = "https://117.102.231.130:9531/qrview";
|
||||||
|
|
||||||
const handlePlay = () => {
|
|
||||||
setIsPlaying(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
setIsPlaying(false);
|
setIsPlaying(false);
|
||||||
resetWA();
|
resetWA();
|
||||||
@@ -45,12 +42,8 @@ const IndexWebControl = memo(function IndexWebControl() {
|
|||||||
<div style={{ padding: '20px' }}>
|
<div style={{ padding: '20px' }}>
|
||||||
|
|
||||||
<div style={{ marginBottom: 20 }}>
|
<div style={{ marginBottom: 20 }}>
|
||||||
<Button type="primary" onClick={handlePlay} style={{ marginRight: 10 }}>
|
<Button type="primary" onClick={handleReset} style={{ marginRight: 10 }}>
|
||||||
▶ Play
|
<ReloadOutlined/> Restart WhatsApp
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button danger onClick={handleReset}>
|
|
||||||
🔄 Reset
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -81,7 +74,7 @@ const IndexWebControl = memo(function IndexWebControl() {
|
|||||||
color: '#888',
|
color: '#888',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Klik Play untuk menjalankan web
|
Memuat Halaman WhatsApp QR Code
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user