|
|
@@ -12,7 +12,7 @@ import * as Yup from "yup";
|
|
|
import { ToastContainer, toast } from "react-toastify";
|
|
|
// import Swal from '@/components/Common/Swal';
|
|
|
import "react-toastify/dist/ReactToastify.css";
|
|
|
-import swal from "sweetalert";
|
|
|
+import swal from "sweetalert2";
|
|
|
|
|
|
const menu = [
|
|
|
{
|
|
|
@@ -61,12 +61,20 @@ class App extends Component {
|
|
|
const log = await getLogPublic({ no_hp, no_laporan });
|
|
|
if (log.data) {
|
|
|
this.setState({ laporan: log.data.laporan, log: log.data.pemantauan });
|
|
|
- // swal.update(toastid, { render: "Berhasil mendapatkan data Pemantauan", type: "success", isLoading: false, autoClose: true, closeButton: true });
|
|
|
- swal("Data ditemukan", "", "success");
|
|
|
+ // swal.fire("Data ditemukan", "", "success");
|
|
|
+ swal.fire({
|
|
|
+ title: 'Data ditemukan',
|
|
|
+ icon: 'success',
|
|
|
+ confirmButtonColor: '#6FB9DE',
|
|
|
+ })
|
|
|
} else {
|
|
|
this.setState({ laporan: null, log: null });
|
|
|
- // swal.update(toastid, { render: "Pemantauan tidak ada", type: "error", isLoading: false, autoClose: true, closeButton: true });
|
|
|
- swal("Data tidak ditemukan", " ", "error");
|
|
|
+ // swal.fire("Data tidak ditemukan", " ", "error");
|
|
|
+ swal.fire({
|
|
|
+ title: 'Data tidak ditemukan',
|
|
|
+ icon: 'error',
|
|
|
+ confirmButtonColor: '#6FB9DE',
|
|
|
+ })
|
|
|
}
|
|
|
};
|
|
|
|