Skip to content

Commit

Permalink
feat(collab): add hint for not logged in user
Browse files Browse the repository at this point in the history
  • Loading branch information
nonumpa committed Jun 27, 2023
1 parent 26c8b52 commit d36a07f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/Collaborate/CollabEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ const CollabEditor = ({ article }) => {
const [editorView, setEditorView] = useState(null);
const currentUser = useCurrentUser();
const onTranscribe = () => {
if (!currentUser) return;
if (!currentUser) {
return alert(t`Please login first.`);
}
const ydoc = new Y.Doc();
const permanentUserData = new Y.PermanentUserData(ydoc);
permanentUserData.setUserMapping(ydoc, ydoc.clientID, currentUser.name);
Expand Down

0 comments on commit d36a07f

Please sign in to comment.