import Layout from '../../../components/layout' import { ITEM_OTS } from '../../../fragments/items' import { getGetServerSideProps } from '../../../api/ssrApollo' import stringifyCanon from 'canonical-json' import { Button } from 'react-bootstrap' export const getServerSideProps = getGetServerSideProps(ITEM_OTS, null, data => !data.item || !data.item.otsHash) export default function OtsItem ({ data: { item } }) { return ( ) } function Ots ({ item }) { const itemString = stringifyCanon({ parentHash: item.parentOtsHash, title: item.title, text: item.text, url: item.url }) return ( <>
sha256 hash
{item.otsHash}
preimage
{item.deletedAt ?
item was deleted by author - original preimage is lost
: (
{itemString}
          
)}
merkle proof
) }