Skip to content

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

fix: each item in list should have unique key

thecodrr1e462d05ebe1
diff --git a/apps/web/src/components/dialogs/move-note-dialog.js b/apps/web/src/components/dialogs/move-note-dialog.js
index 9631bad2d..a218a56c9 100644
--- a/apps/web/src/components/dialogs/move-note-dialog.js
+++ b/apps/web/src/components/dialogs/move-note-dialog.js
@@ -24,7 +24,11 @@ export default class MoveDialog extends React.Component {
return (
<Dialog
isOpen={true}
- title={type === "notes" ? "Move Note" : "Select " + toTitleCase(type.substring(0, type.length - 1))}
+ title={
+ type === "notes"
+ ? "Move Note"
+ : "Select " + toTitleCase(type.substring(0, type.length - 1))
+ }
icon={Icon.Move}
content={
<Box>
@@ -109,6 +113,7 @@ export default class MoveDialog extends React.Component {
items.map(item => {
return (
<Flex
+ key={item.title + item.dateCreated}
sx={{
borderWidth: 1,
padding: 2,
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index 0550f4e24..c58a3ad14 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -88,6 +88,7 @@ function Note(props) {
<Flex justifyContent="center" alignItems="center">
{note.colors.map((item, index) => (
<Box
+ key={item}
style={{
width: 13,
marginLeft: index ? -8 : 0,
diff --git a/apps/web/src/components/notebook/index.js b/apps/web/src/components/notebook/index.js
index 41e77fba3..5ff1a1525 100644
--- a/apps/web/src/components/notebook/index.js
+++ b/apps/web/src/components/notebook/index.js
@@ -52,7 +52,7 @@ export default class Notebook extends React.Component {
onTopicClick(notebook, topic);
e.stopPropagation();
}}
- key={topic.id + topic.title}
+ key={topic.id}
bg="primary"
px={1}
sx={{
diff --git a/apps/web/src/components/properties/index.js b/apps/web/src/components/properties/index.js
index e3da2ab72..973695365 100644
--- a/apps/web/src/components/properties/index.js
+++ b/apps/web/src/components/properties/index.js
@@ -160,6 +160,7 @@ const Properties = props => {
>
{tags.map(tag => (
<Text
+ key={tag}
sx={{
backgroundColor: "primary",
color: "static",
diff --git a/apps/web/src/navigation/index.js b/apps/web/src/navigation/index.js
index 36733449c..c64aee826 100644
--- a/apps/web/src/navigation/index.js
+++ b/apps/web/src/navigation/index.js
@@ -122,6 +122,7 @@ const NavigationContainer = props => {
<Flex>
{props.route.options.map(option => (
<Box
+ key={option.icon.name}
onClick={option.onClick}
mx={2}
sx={{ cursor: "pointer" }}