Skip to content

Commit

Permalink
fix: label needs to be string
Browse files Browse the repository at this point in the history
  • Loading branch information
hkgnp committed Sep 4, 2023
1 parent 8a322fa commit ef0e2ce
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
const config = {
env: {
browser: true,
es2021: true,
Expand Down Expand Up @@ -39,3 +39,5 @@ module.exports = {
],
},
};

module.exports = config;
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/logseq-todoist-plugin.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions src/features/send/components/SendTask.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sendTask } from "..";
import "./send-task.css";
import { useState } from "preact/hooks";
import { getIdFromString } from "../../helpers";
import { getIdFromString, getNameFromString } from "../../helpers";

export const SendTask = ({
projects,
Expand All @@ -21,7 +21,14 @@ export const SendTask = ({
//@ts-expect-error
const handleSubmit = async (event) => {
event.preventDefault();
await sendTask(uuid, content, getIdFromString(projectId), deadline, label);
await sendTask(
uuid,
content,
getIdFromString(projectId),
deadline,
getNameFromString(label),
);
logseq.hideMainUI();
};

return (
Expand Down
1 change: 0 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const main = async () => {
"Please key in your API key before using the plugin",
"error",
);
return;
}
const projects = await getAllProjects();
const labels = await getAllLabels();
Expand Down

0 comments on commit ef0e2ce

Please sign in to comment.