redirect.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import React, { Component } from "react";
  2. import BasePage from "@/components/Layout/BasePage";
  3. import {
  4. Row,
  5. Col,
  6. FormGroup,
  7. Input,
  8. Card,
  9. CardBody,
  10. Button,
  11. Navbar,
  12. NavItem,
  13. NavLink,
  14. NavbarBrand,
  15. NavbarToggler,
  16. Nav,
  17. Collapse,
  18. } from "reactstrap";
  19. import Link from "next/link";
  20. import ContentWrapper from "@/components/Layout/ContentWrapper";
  21. import { getPelaporanPublic } from "@/actions/pelaporan";
  22. import DetailLaporan from "@/components/Public/DetailLaporan";
  23. import { getLogPublic } from "@/actions/log";
  24. import Timeline from "@/components/Main/Timeline";
  25. import { Formik, Form, Field, ErrorMessage } from "formik";
  26. import * as Yup from "yup";
  27. import { ToastContainer, toast } from "react-toastify";
  28. // import Swal from '@/components/Common/Swal';
  29. import "react-toastify/dist/ReactToastify.css";
  30. import swal from "sweetalert2";
  31. class App extends Component {
  32. constructor(props) {
  33. super(props);
  34. this.state = {
  35. };
  36. }
  37. handleRedirect = () => {
  38. // Ganti URL tujuan ke domain baru
  39. window.location.href = "https://domainbaru.com"; };
  40. render() {
  41. const { } = this.state;
  42. return (
  43. <div>
  44. <ToastContainer />
  45. <Navbar className="navbar-color" expand="md" dark>
  46. <NavbarBrand href="/">
  47. <img
  48. className="width-133"
  49. src="/static/img/Logo-Sidali.png"
  50. alt="App Logo"
  51. />
  52. </NavbarBrand>
  53. </Navbar>
  54. <div className="flex flex-col items-center justify-center min-h-screen bg-white text-center">
  55. {/* Ilustrasi */}
  56. <div className='main text-center pt-1 mt-5'>
  57. <img
  58. className="main"
  59. src="/static/img/redirect.png"
  60. alt="gambar"
  61. width="500"
  62. height="300"
  63. />
  64. </div>
  65. {/* Teks */}
  66. <h3 className="text-2xl font-semibold mt-6 font-color-black mt-5">
  67. Halaman ini telah dipindahkan!
  68. </h3>
  69. <p className="text-gray-600 mt-2 max-w-md">
  70. Website ini sudah pindah ke domain baru agar bisa memberikan layanan yang lebih baik untuk Anda.
  71. </p>
  72. <div className="btn-radius d-block text-center" onClick={this.handleRedirect}>
  73. <Button color className="btn-labeled-2 mt-1">
  74. <h4 className="p-0 mt-2 font-color-white">Lanjut ke halaman baru</h4>
  75. </Button>
  76. </div>
  77. </div>
  78. </div>
  79. );
  80. }
  81. }
  82. App.Layout = BasePage;
  83. export default App;