mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 07:59:48 +01:00
refactor: fix all warnings
This commit is contained in:
@@ -7,7 +7,6 @@ import { store as notebookStore } from "../stores/notebook-store";
|
||||
import { store as appStore } from "../stores/app-store";
|
||||
import { db } from "./db";
|
||||
import { showToast } from "../utils/toast";
|
||||
import { CHECK_IDS } from "notes-core/common";
|
||||
import { Flex, Text } from "rebass";
|
||||
import * as Icon from "../components/icons";
|
||||
import download from "../utils/download";
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
showPasswordDialog,
|
||||
} from "../common/dialog-controller";
|
||||
import Config from "../utils/config";
|
||||
import { store as userstore } from "../stores/user-store";
|
||||
import { hashNavigate, getCurrentHash } from "../navigation";
|
||||
import { db } from "./db";
|
||||
import { sanitizeFilename } from "../utils/filename";
|
||||
|
||||
@@ -3,7 +3,6 @@ import { Text, Flex, Button } from "rebass";
|
||||
import Dialog from "./dialog";
|
||||
import * as Icon from "../icons";
|
||||
import { useStore as useUserStore } from "../../stores/user-store";
|
||||
import { useStore as useThemeStore } from "../../stores/theme-store";
|
||||
import { getCouponData, upgrade } from "../../common/checkout";
|
||||
import { showLogInDialog } from "../../common/dialog-controller";
|
||||
import { ReactComponent as Personalization } from "../../assets/accent.svg";
|
||||
|
||||
@@ -4,7 +4,6 @@ import Dialog from "./dialog";
|
||||
import Field from "../field";
|
||||
import { Checkbox, Label } from "@rebass/forms";
|
||||
|
||||
const requiredValues = ["password", "newPassword", "oldPassword"];
|
||||
function PasswordDialog(props) {
|
||||
const { type, checks } = props;
|
||||
const [error, setError] = useState();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect, useCallback } from "react";
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { Flex, Box, Text, Button } from "rebass";
|
||||
import * as Icon from "../icons";
|
||||
import ContentToggle from "./content-toggle";
|
||||
@@ -6,7 +6,6 @@ import { store as notesStore } from "../../stores/note-store";
|
||||
import { db } from "../../common/db";
|
||||
import { useStore as useAppStore } from "../../stores/app-store";
|
||||
import { useStore as useThemeStore } from "../../stores/theme-store";
|
||||
import { useStore as useUserStore } from "../../stores/user-store";
|
||||
import { useStore as useEditorStore } from "../../stores/editor-store";
|
||||
import { hashNavigate } from "../../navigation";
|
||||
import HTMLDiffer from "./differ";
|
||||
@@ -127,7 +126,7 @@ function DiffViewer(props) {
|
||||
conflicts = undefined;
|
||||
currentConflict = undefined;
|
||||
})();
|
||||
}, []);
|
||||
}, [noteId, resolveConflict]);
|
||||
|
||||
useEffect(() => {
|
||||
let cssPath = "";
|
||||
|
||||
@@ -3,7 +3,6 @@ import { db } from "../common/db";
|
||||
import { store as noteStore } from "./note-store";
|
||||
import { store as notebookStore } from "./notebook-store";
|
||||
import { store as trashStore } from "./trash-store";
|
||||
import { store as editorStore } from "./editor-store";
|
||||
import { store as tagStore } from "./tag-store";
|
||||
import BaseStore from "./index";
|
||||
import { isMobile } from "../utils/dimensions";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { Button, Flex, Text } from "rebass";
|
||||
import ThemeProvider from "../components/theme-provider";
|
||||
import { db } from "../common/db";
|
||||
import { showBuyDialog } from "../common/dialog-controller";
|
||||
import { trackEvent } from "../utils/analytics";
|
||||
import { useQueryParams } from "../navigation";
|
||||
|
||||
@@ -107,74 +105,74 @@ function BlogPromoBanner(props) {
|
||||
);
|
||||
}
|
||||
|
||||
function SaleBanner(props) {
|
||||
const { discount, coupon, userId } = props;
|
||||
// function SaleBanner(props) {
|
||||
// const { discount, coupon, userId } = props;
|
||||
|
||||
return (
|
||||
<Flex flexDirection="column" p={4}>
|
||||
<Text
|
||||
as="p"
|
||||
variant="body"
|
||||
fontSize="title"
|
||||
lineHeight="22px"
|
||||
textAlign="center"
|
||||
>
|
||||
We started out building Notesnook in November 2019. Our mission was to
|
||||
make privacy simple. It is one thing to say,{" "}
|
||||
<Text as="span" color="primary">
|
||||
"Privacy is our basic right"
|
||||
</Text>{" "}
|
||||
and quite another to actually prove it.
|
||||
<br />
|
||||
Almost 1 and a half year later, we are here with over 2000 users, 5000+
|
||||
downloads on Google Play Store, 10,000+ encrypted notes, and 100+
|
||||
members in our Discord community; all proof that{" "}
|
||||
<Text as="span" color="primary">
|
||||
privacy matters.
|
||||
</Text>
|
||||
<br />
|
||||
</Text>
|
||||
<Text variant="title" mt={2} textAlign="center">
|
||||
In celebration of this happy day, we are giving a special discount to
|
||||
all our new members.
|
||||
</Text>
|
||||
<Text
|
||||
variant="heading"
|
||||
fontSize={32}
|
||||
color="primary"
|
||||
textAlign="center"
|
||||
fontWeight="bold"
|
||||
mt={2}
|
||||
>
|
||||
{discount}% OFF if you subscribe today!
|
||||
</Text>
|
||||
<Button
|
||||
mt={2}
|
||||
fontSize="title"
|
||||
width="100%"
|
||||
fontWeight="bold"
|
||||
sx={{ boxShadow: "2px 2px 15px 0px #00000044" }}
|
||||
onClick={async () => {
|
||||
trackEvent(`Email verification offer`, "offers");
|
||||
let user = await db.user.getUser();
|
||||
if (user && user.id !== userId) await db.user.logout(true);
|
||||
await showBuyDialog(coupon);
|
||||
}}
|
||||
>
|
||||
Subscribe now and stand up for privacy!
|
||||
</Button>
|
||||
<Text variant="body" textAlign="center" mt={2} color="fontTertiary">
|
||||
Big companies say, "X feature won't be possible if we went
|
||||
zero-knowledge." We are here to call them out. Your contribution will
|
||||
help us prove that giving up on privacy is just an excuse to rip users
|
||||
off, sell their data and make money.
|
||||
<Text variant="body" fontSize="subBody" mt={1}>
|
||||
*Use code <b>{coupon}</b> at checkout to get your discount.
|
||||
</Text>
|
||||
<Text variant="body" fontSize="subBody" mt={1}>
|
||||
** Only the first 10 people get to claim the discount. Be the first.
|
||||
</Text>
|
||||
</Text>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
// return (
|
||||
// <Flex flexDirection="column" p={4}>
|
||||
// <Text
|
||||
// as="p"
|
||||
// variant="body"
|
||||
// fontSize="title"
|
||||
// lineHeight="22px"
|
||||
// textAlign="center"
|
||||
// >
|
||||
// We started out building Notesnook in November 2019. Our mission was to
|
||||
// make privacy simple. It is one thing to say,{" "}
|
||||
// <Text as="span" color="primary">
|
||||
// "Privacy is our basic right"
|
||||
// </Text>{" "}
|
||||
// and quite another to actually prove it.
|
||||
// <br />
|
||||
// Almost 1 and a half year later, we are here with over 2000 users, 5000+
|
||||
// downloads on Google Play Store, 10,000+ encrypted notes, and 100+
|
||||
// members in our Discord community; all proof that{" "}
|
||||
// <Text as="span" color="primary">
|
||||
// privacy matters.
|
||||
// </Text>
|
||||
// <br />
|
||||
// </Text>
|
||||
// <Text variant="title" mt={2} textAlign="center">
|
||||
// In celebration of this happy day, we are giving a special discount to
|
||||
// all our new members.
|
||||
// </Text>
|
||||
// <Text
|
||||
// variant="heading"
|
||||
// fontSize={32}
|
||||
// color="primary"
|
||||
// textAlign="center"
|
||||
// fontWeight="bold"
|
||||
// mt={2}
|
||||
// >
|
||||
// {discount}% OFF if you subscribe today!
|
||||
// </Text>
|
||||
// <Button
|
||||
// mt={2}
|
||||
// fontSize="title"
|
||||
// width="100%"
|
||||
// fontWeight="bold"
|
||||
// sx={{ boxShadow: "2px 2px 15px 0px #00000044" }}
|
||||
// onClick={async () => {
|
||||
// trackEvent(`Email verification offer`, "offers");
|
||||
// let user = await db.user.getUser();
|
||||
// if (user && user.id !== userId) await db.user.logout(true);
|
||||
// await showBuyDialog(coupon);
|
||||
// }}
|
||||
// >
|
||||
// Subscribe now and stand up for privacy!
|
||||
// </Button>
|
||||
// <Text variant="body" textAlign="center" mt={2} color="fontTertiary">
|
||||
// Big companies say, "X feature won't be possible if we went
|
||||
// zero-knowledge." We are here to call them out. Your contribution will
|
||||
// help us prove that giving up on privacy is just an excuse to rip users
|
||||
// off, sell their data and make money.
|
||||
// <Text variant="body" fontSize="subBody" mt={1}>
|
||||
// *Use code <b>{coupon}</b> at checkout to get your discount.
|
||||
// </Text>
|
||||
// <Text variant="body" fontSize="subBody" mt={1}>
|
||||
// ** Only the first 10 people get to claim the discount. Be the first.
|
||||
// </Text>
|
||||
// </Text>
|
||||
// </Flex>
|
||||
// );
|
||||
// }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { useMemo, useState } from "react";
|
||||
import ListContainer from "../components/list-container";
|
||||
import SearchPlaceholder from "../components/placeholders/search-placeholder";
|
||||
import { db } from "../common/db";
|
||||
|
||||
Reference in New Issue
Block a user