'npm run prettier'

This commit is contained in:
0x1eef 2024-04-26 22:24:52 -03:00
parent 935643cff2
commit 5757e6647d
2 changed files with 9 additions and 6 deletions

View file

@ -19,8 +19,11 @@ export function App({ children }: PropsWithChildren<{}>) {
/* allowlist: param keys acceptable as cookie keys */
const allowlist = ["projectId"];
Object.entries(params).forEach(([key, value]) => {
if (allowlist.includes(key) && cookies[key] !== value &&
/^[0-9A-Za-z]+$/.test(String(value))) {
if (
allowlist.includes(key) &&
cookies[key] !== value &&
/^[0-9A-Za-z]+$/.test(String(value))
) {
document.cookie = `${key}=${value}; path=/`;
}
});

View file

@ -7,21 +7,21 @@ import { Task } from "~/components/Task";
(function () {
const components = {
"Task": () => (
Task: () => (
<App>
<Task />
</App>
),
"Tasks": () => (
Tasks: () => (
<App>
<Tasks />
</App>
),
"Projects": () => (
Projects: () => (
<App>
<Projects />
</App>
)
),
};
const ents = Object.entries(components);
for (let i = 0; i < ents.length; i++) {