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