mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 23:54:42 -04:00
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:
parent
3399ed2023
commit
26f90505ff
227 changed files with 4726 additions and 2310 deletions
|
@ -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')}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue