Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

ui: improve loginbar

thecodrrf98877c78642
diff --git a/apps/web/src/components/list-container/index.js b/apps/web/src/components/list-container/index.js
index 818bb2094..78b76188f 100644
--- a/apps/web/src/components/list-container/index.js
+++ b/apps/web/src/components/list-container/index.js
@@ -28,7 +28,6 @@ function ListContainer(props) {
return (
<Flex variant="columnFill">
- <LoginBar />
{!props.items.length && props.placeholder ? (
<Flex variant="columnCenterFill">
<props.placeholder />
@@ -36,6 +35,7 @@ function ListContainer(props) {
) : (
<>
{!props.noSearch && <Search type={props.type} />}
+ <LoginBar />
<Flex variant="columnFill" mt={2}>
{props.children
? props.children
diff --git a/apps/web/src/components/loginbar/index.js b/apps/web/src/components/loginbar/index.js
index a9a97ddd6..14d2669c9 100644
--- a/apps/web/src/components/loginbar/index.js
+++ b/apps/web/src/components/loginbar/index.js
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React from "react";
import { Flex, Text } from "rebass";
import { useStore as useUserStore } from "../../stores/user-store";
import { getRandom } from "../../utils/random";
@@ -11,21 +11,22 @@ const data = [
function LoginBar() {
const isLoggedIn = useUserStore((store) => store.isLoggedIn);
- const [text] = useState(data[getRandom(0, data.length)]);
if (isLoggedIn) return null;
return (
<Flex
flexDirection="column"
p={2}
- mb={2}
+ mt={2}
width="100%"
bg="shade"
sx={{ cursor: "pointer" }}
onClick={showLogInDialog}
>
- <Text variant="body">{text}</Text>
<Text variant="subBody">Click here to login</Text>
+ <Text variant="body" color="primary">
+ {data[getRandom(0, data.length - 1)]}
+ </Text>
</Flex>
);
}