Skip to content

Commit

Permalink
Fix env config error and update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
nonumpa committed Jun 25, 2023
1 parent e5868fc commit 51795a7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/Collaborate/CollabEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ import { makeStyles } from '@material-ui/core/styles';
import useCurrentUser from 'lib/useCurrentUser';
import cx from 'clsx';
import PlaceholderPlugin from './Placeholder';
import getConfig from 'next/config';

const {
publicRuntimeConfig: { PUBLIC_HOCUSPOCUS_URL },
} = getConfig();

const useStyles = makeStyles(theme => ({
transcriptHeader: {
Expand Down Expand Up @@ -92,7 +97,7 @@ const CollabEditor = ({ article }) => {
ydoc.gc = false;

const provider = new HocuspocusProvider({
url: process.env.PUBLIC_HOCUSPOCUS_URL,
url: PUBLIC_HOCUSPOCUS_URL,
name: article.id,
broadcast: false,
token: 'test',
Expand Down Expand Up @@ -122,7 +127,7 @@ const CollabEditor = ({ article }) => {
'Mod-y': redo,
'Mod-Shift-z': redo,
}),
PlaceholderPlugin('Input text'),
PlaceholderPlugin(t`Input transcript`),
].concat(exampleSetup({ schema, menuBar: false })),
}),
})
Expand Down Expand Up @@ -184,7 +189,7 @@ const CollabEditor = ({ article }) => {
color="textSecondary"
display="block"
>
{t`Text`}
{t`Transcript`}
</Typography>
{!editorView ? (
<>
Expand Down

0 comments on commit 51795a7

Please sign in to comment.