Skip to content

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

Minor refactoring for properties (#3)

Waqar Ahmed2e3574fd7cec
diff --git a/apps/web/src/components/properties/index.js b/apps/web/src/components/properties/index.js
index 99eebc7d5..d6bf114e1 100644
--- a/apps/web/src/components/properties/index.js
+++ b/apps/web/src/components/properties/index.js
@@ -86,10 +86,14 @@ const Properties = props => {
variant="default"
placeholder="#tag"
sx={{ marginBottom: 2 }}
- onKeyUp={e => {
- if (e.key === "Enter" || e.key === " " || e.key === ",") {
- props.addTag && props.addTag(e.target.value);
- e.target.value = "";
+ onKeyUp={event => {
+ if (
+ event.key === "Enter" ||
+ event.key === " " ||
+ event.key === ","
+ ) {
+ props.addTag && props.addTag(event.target.value);
+ event.target.value = "";
}
}}
/>
@@ -101,7 +105,7 @@ const Properties = props => {
flexWrap="wrap"
>
{props.tags &&
- props.tags.map(v => (
+ props.tags.map(tag => (
<Text
sx={{
backgroundColor: "primary",
@@ -112,7 +116,7 @@ const Properties = props => {
marginRight: 1
}}
>
- #{v}
+ #{tag}
</Text>
))}
</Flex>