Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi0498 committed Feb 12, 2023
1 parent 02bc165 commit ddc242d
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: false,
semi: true,
singleQuote: false,
trailingComma: "none",
bracketSpacing: true,
Expand Down
77 changes: 65 additions & 12 deletions popup.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,71 @@
import { useState } from "react"
import { useEffect, useState } from "react";

const useLocalStorage = (key: string, defaultValue: any) => {
const [value, setValue] = useState(() => {
let currentValue: any;

try {
currentValue = JSON.parse(
localStorage.getItem(key) || String(defaultValue)
);
} catch (error) {
currentValue = defaultValue;
}

return currentValue;
});

useEffect(() => {
localStorage.setItem(key, JSON.stringify(value));
}, [value, key]);

return [value, setValue];
};

function IndexPopup() {
const [data, setData] = useState("")
// const storage = new Storage({});

useEffect(() => {
document.querySelector("html").style.width = "500px";
(async () => {
// await storage.set("copyAssignee", false);
})();
}, []);

return (
<div
style={{
display: "flex",
flexDirection: "column",
padding: 16
}}>
<h2> Extension to copy FreshRelease Tasks </h2>
</div>
)
<>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"></link>
<div
style={{
padding: 6
}}>
<h3> Extension to copy FreshRelease Tasks </h3>
<p>
{" "}
Click on the{" "}
<span style={{ fontSize: 16 }} className="material-symbols-outlined">
content_copy
</span>{" "}
button to copy the tasks{" "}
</p>

<h3> Settings </h3>

<input
onChange={(e) => {
// setCopyAssignee(e.target.checked)
}}
type="checkbox"
id="copy"
name="copy"
value={"false"}
/>
<label htmlFor="copy"> Include Assignee </label>
</div>
</>
);
}

export default IndexPopup
export default IndexPopup;

0 comments on commit ddc242d

Please sign in to comment.