Adapt react-client to use the real backend API (#1545)

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Erik Michelson 2022-04-15 23:03:15 +02:00 committed by GitHub
parent 3399ed2023
commit 26f90505ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
227 changed files with 4726 additions and 2310 deletions

View file

@ -11,12 +11,15 @@ import { useTranslation } from 'react-i18next'
import { useApplicationState } from '../../../hooks/common/use-application-state'
import Link from 'next/link'
/**
* Button that links to the read-only version of a note.
*/
export const ReadOnlyModeButton: React.FC = () => {
const { t } = useTranslation()
const id = useApplicationState((state) => state.noteDetails.id)
const noteIdentifier = useApplicationState((state) => state.noteDetails.primaryAddress)
return (
<Link href={`/s/${id}`}>
<Link href={`/s/${noteIdentifier}`}>
<a target='_blank'>
<Button
title={t('editor.documentBar.readOnlyMode')}