import React from "react"; import { Formik, Field, Form, ErrorMessage } from "formik"; import * as Yup from "yup"; import { PageTemplate } from "Components"; import { GetAllGoLinks } from "../../Utils"; const SignupSchema = Yup.object().shape({ password: Yup.string() .min(2, "Too Short!") .max(50, "Too Long!"), email: Yup.string() .email("Invalid email") .required("Required") }); class DebugCRUD extends React.Component { constructor(props) { super(props); this.state = { AllGoLinks: [], error: null }; } async componentDidMount() { GetAllGoLinks() .then(data => this.setState({ AllGoLinks: data }) ) .catch(reason => this.setState({ error: reason })); } render() { return (

Debug CRUD Page

Create

{ setTimeout(() => { console.log(JSON.stringify(values, null, 2)); setSubmitting(false); }, 400); }} render={({ isSubmitting }) => (
)} />

Read

{this.state.AllGoLinks.map(golink => (
  • /{golink.short} |{" "} {golink.destination}
  • ))}

    Update

    { setTimeout(() => { console.log(JSON.stringify(values, null, 2)); setSubmitting(false); }, 400); }} render={({ isSubmitting }) => (
    )} />

    Delete

    { setTimeout(() => { console.log(JSON.stringify(values, null, 2)); setSubmitting(false); }, 400); }} render={({ isSubmitting }) => (
    )} />
    ); } } export default DebugCRUD;