Skip to content

Instantly share code, notes, and snippets.

@Aslemammad
Created July 13, 2020 11:22
Show Gist options
  • Select an option

  • Save Aslemammad/0535e9ded78fd27d3f263d0aa87e9862 to your computer and use it in GitHub Desktop.

Select an option

Save Aslemammad/0535e9ded78fd27d3f263d0aa87e9862 to your computer and use it in GitHub Desktop.

Revisions

  1. Aslemammad created this gist Jul 13, 2020.
    22 changes: 22 additions & 0 deletions PostPage.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    import React from 'react';
    import { Reoverlay } from 'reoverlay';

    const PostPage = () => {

    const deletePost = () => {
    // showModal("Component name in config", props)
    Reoverlay.showModal("ConfirmModal", {
    confirmText: "Are you sure you want to delete this post",
    onConfirm: () => {
    axios.delete(...)
    }
    })
    }

    return (
    <div>
    <p>This is your post page</p>
    <button onClick={deletePost}>Delete this post</button>
    </div>
    )
    }