import * as React from "react"; import { SlideCheckbox, Checkbox, QuestionToolTip, BorderlessButton, Modal, ModalHeading, buttonSizes, Button, } from "@joincivil/components"; import { MainHeading } from "../styles"; import { urls } from "../../constants"; import styled from "styled-components"; export interface ArchiveControlsProps { archiveSelected: boolean; ethTransaction: boolean; ipfsSelected: boolean; isArchived?: boolean; pendingTransaction?: boolean; intro?: React.ReactNode; onHeaderClick(): void; onSelectEthTransaction(): void; } export interface ArchiveControlsState { modalOpen?: boolean; } const HeaderWithFlex = MainHeading.extend` display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; `; const LowerHeader = HeaderWithFlex.extend` font-size: 13px; `; const Wrapper = styled.div` margin-bottom: 15px; `; const WhatsTheDifference = styled(BorderlessButton)` padding-left: 0; margin-left: 0; font-size: 13px; font-weight: 400; text-decoration: underline; `; export class ArchiveControls extends React.Component { constructor(props: ArchiveControlsProps) { super(props); this.state = { modalOpen: false, }; } public renderModal(): JSX.Element | null { if (!this.state.modalOpen) { return null; } return ( What's the difference?

IPFS: The InterPlanetary File System is a peer-to-peer file sharing protocol that lets you save your posts across a distributed network that tracks changes to these files over time. It creates a new, resilient decentralized archive. Every article indexed or archived to the blockchain on the Civil Publisher will also by default be indexed or archived onto IPFS. The benefits of IPFS are that it’s free and can host multimedia content. However, like other peer-to-peer systems, the content on IPFS is as permanent as the number of people willing to host or store it. We currently use Infura as our IPFS provider. Eventually, other users and nodes may also pin the content as well.

Ethereum Blockchain: Ethereum is an open platform where data is replicated across all computers using the network. All information on this network is public can't be shut down as long as all the computers are contributing to the network. Since the records are all shared, there is no one central location of the data. This allows for redundancy, limits on censorship or attempts to remove posts, and a place for permanent archiving. The Ethereum Blockchain option requires users to pay a transaction fee (also known as gas) to post content and can only include text at this time.

Read more about Publishing in our FAQ ↗

); } public render(): JSX.Element { const controls = this.props.archiveSelected ? ( <>

Select where you would like to publish your archive.

IPFS (Peer-to-Peer) {}} locked={true} />

Archive to a peer-to-peer distribution network where members of the network pin content to provide a permanent archive of your post. Cost: Free

Ethereum blockchain

Archive to the Ethereum blockchain network to provide a permanent archive of your post.{" "} Cost: Varies

this.setState({ modalOpen: true })} size={buttonSizes.SMALL}> What’s the difference? ) : null; return ( <> {this.props.isArchived && "Update "} Full-Text Archive{" "} {this.props.intro} {controls} {this.renderModal()} ); } }