Skip to content

Instantly share code, notes, and snippets.

@p14n
Created May 15, 2018 20:19
Show Gist options
  • Save p14n/b54d7ccc1deabe355ab7f04c56d891a8 to your computer and use it in GitHub Desktop.
Save p14n/b54d7ccc1deabe355ab7f04c56d891a8 to your computer and use it in GitHub Desktop.
Forms
export const Forms = ({ status, killed, account, dispatch }) => {
if (killed) return <KillForm />;
return (
<div>
{status ? <span /> : <CreateForm dispatch={dispatch} account={account} />}
{status == "payable" ? (
<PayForm dispatch={dispatch} account={account} />
) : (
<span />
)}
{status == "reclaimable" ? (
<ReclaimForm dispatch={dispatch} account={account} />
) : (
<span />
)}
<KillForm account={account} dispatch={dispatch} />
</div>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment