diff --git a/apps/web/src/app.js b/apps/web/src/app.js index 215cc9054..265bac35c 100644 --- a/apps/web/src/app.js +++ b/apps/web/src/app.js @@ -23,6 +23,7 @@ import { showAccountDeletedNotice, showPasswordChangedNotice, } from "./components/dialogs/confirm"; +import StatusBar from "./components/statusbar"; function App() { const [show, setShow] = useState(true); @@ -104,39 +105,48 @@ function App() { return ( - - setShow(state || !show)} - /> - - - {isMobile && } - {routeResult} - - - + + + setShow(state || !show)} + /> + + + {isMobile && } + {routeResult} + + + + + + - - + ); diff --git a/apps/web/src/components/editor/footer.js b/apps/web/src/components/editor/footer.js index c8e10f261..179c8887b 100644 --- a/apps/web/src/components/editor/footer.js +++ b/apps/web/src/components/editor/footer.js @@ -3,24 +3,25 @@ import { Flex, Text } from "rebass"; import { useStore } from "../../stores/editor-store"; import { timeConverter } from "../../utils/time"; -function Footer() { +function EditorFooter() { const dateEdited = useStore((store) => store.session.dateEdited); const id = useStore((store) => store.session.id); const totalWords = useStore((store) => store.session.totalWords); const isSaving = useStore((store) => store.session.isSaving); + if (!id) return null; return ( - - - {id ? totalWords + " words" : "-"} + + + {totalWords + " words"} - {timeConverter(dateEdited) || "-"} + {timeConverter(dateEdited)} - {id ? (isSaving ? "Saving" : "Saved") : "-"} + {isSaving ? "Saving" : "Saved"} ); } -export default Footer; +export default EditorFooter; const TextSeperator = () => { return ( diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.js index 648728c95..2423e06d1 100644 --- a/apps/web/src/components/editor/index.js +++ b/apps/web/src/components/editor/index.js @@ -19,7 +19,6 @@ import useMobile from "../../utils/use-mobile"; import useTablet from "../../utils/use-tablet"; import { SUBSCRIPTION_STATUS } from "../../common"; import Toolbar from "./toolbar"; -import Footer from "./footer"; import ObservableArray from "../../utils/observablearray"; import Banner from "../banner"; import EditorLoading from "./loading"; @@ -170,7 +169,6 @@ function Editor() { )} -