Add real buttons to document header

Fixed: Incorrect page title when starting a new doc
Fixed: Linting error
This commit is contained in:
Tom Moor
2019-01-05 18:45:19 -08:00
parent f80e4ab04c
commit 18859bec3d
5 changed files with 48 additions and 39 deletions

View File

@@ -300,7 +300,9 @@ class DocumentScene extends React.Component<Props> {
if (!document || !Editor) {
return (
<Container column auto>
<PageTitle title={location.state ? location.state.title : ''} />
<PageTitle
title={location.state ? location.state.title : 'Untitled'}
/>
<CenteredContent>
<LoadingState />
</CenteredContent>
@@ -330,7 +332,7 @@ class DocumentScene extends React.Component<Props> {
)}
/>
<PageTitle
title={document.title.replace(document.emoji, '')}
title={document.title.replace(document.emoji, '') || 'Untitled'}
favicon={document.emoji ? emojiToUrl(document.emoji) : undefined}
/>
{(this.isUploading || this.isSaving) && <LoadingIndicator />}