Skip to content

Commit

Permalink
Null project selection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesoroka committed May 21, 2024
1 parent 64c76b4 commit 6a9f45b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ui/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ export default function Select({ url, setProjectName, projectName }) {
[search, data]
);

localStorage.setItem("project", project);
localStorage.setItem("projectID", projectID);

const resetProject = () => {
localStorage.clear();
setProjectName("");
localStorage.setItem("project", "");
localStorage.setItem("projectID", "");
localStorage.clear();
};
console.log(project);

return (
<section>
Expand Down Expand Up @@ -70,6 +68,8 @@ export default function Select({ url, setProjectName, projectName }) {
<p
key={item.id}
onClick={() => {
localStorage.setItem("project", item.name);
localStorage.setItem("projectID", item.id);
setProject(item.name);
setProjectID(item.id);
setProjectName(item.name);
Expand Down

0 comments on commit 6a9f45b

Please sign in to comment.