diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-08-03 13:18:38 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-08-03 13:18:38 +0200 |
commit | a0f0e5aabee5b3bad68afb7eab092b684275e6fa (patch) | |
tree | 9e1e5a4e14aabb383c3b2c3989f4c70fcdf42ab1 | |
parent | 44cbce4390aee4c96d729261953874a58d4349f7 (diff) |
fix: make tags update correctly and show them on refresh
-rw-r--r-- | components/tweaks.tsx | 14 | ||||
-rw-r--r-- | out/404.html | 6 | ||||
-rw-r--r-- | out/_next/static/DEWNAb9qrxKluipBrYTq4/_buildManifest.js (renamed from out/_next/static/25Qud6GB6GP8XFN1eDqNi/_buildManifest.js) | 2 | ||||
-rw-r--r-- | out/_next/static/DEWNAb9qrxKluipBrYTq4/_ssgManifest.js (renamed from out/_next/static/25Qud6GB6GP8XFN1eDqNi/_ssgManifest.js) | 0 | ||||
-rw-r--r-- | out/_next/static/chunks/pages/index-689c814695b38e570f06.js (renamed from out/_next/static/chunks/pages/index-5e5acac3b4261d15dbc3.js) | 14 | ||||
-rw-r--r-- | out/index.html | 8 |
6 files changed, 30 insertions, 14 deletions
diff --git a/components/tweaks.tsx b/components/tweaks.tsx index cb1fec0..5561a1b 100644 --- a/components/tweaks.tsx +++ b/components/tweaks.tsx @@ -1299,7 +1299,11 @@ export const TagPanel = (props: TagPanelProps) => { }) // .concat[{ value: 'placeholder', label: 'New filter' }] - const [selectedItems, setSelectedItems] = useState<typeof tagArray>([]) + const [selectedItems, setSelectedItems] = useState<typeof tagArray>( + filter.tags.map((tag) => { + return { value: tag, label: tag } + }), + ) return ( <CUIAutoComplete @@ -1312,7 +1316,7 @@ export const TagPanel = (props: TagPanelProps) => { onSelectedItemsChange={(changes) => { if (changes.selectedItems) { setSelectedItems(changes.selectedItems) - setFilter({ ...filter, tags: selectedItems.map((item) => item.value) }) + setFilter({ ...filter, tags: changes.selectedItems.map((item) => item.value) }) } }} listItemStyleProps={{ overflow: 'hidden' }} @@ -1349,7 +1353,11 @@ export const TagColorPanel = (props: TagColorPanelProps) => { return { value: tag, label: tag } }) - const [selectedItems, setSelectedItems] = useState<typeof tagArray>([]) + const [selectedItems, setSelectedItems] = useState<typeof tagArray>( + Object.keys(tagColors).map((tag) => { + return { value: tag, label: tag } + }), + ) return ( <Box> diff --git a/out/404.html b/out/404.html index 07cef7b..aa19d0d 100644 --- a/out/404.html +++ b/out/404.html @@ -18,8 +18,8 @@ <script src="/_next/static/chunks/main-ae68c11529959c16c50f.js" defer=""></script> <script src="/_next/static/chunks/pages/_app-b9a9a4081d35806300d5.js" defer=""></script> <script src="/_next/static/chunks/pages/_error-f5e67a79c709c2df06b8.js" defer=""></script> - <script src="/_next/static/25Qud6GB6GP8XFN1eDqNi/_buildManifest.js" defer=""></script> - <script src="/_next/static/25Qud6GB6GP8XFN1eDqNi/_ssgManifest.js" defer=""></script> + <script src="/_next/static/DEWNAb9qrxKluipBrYTq4/_buildManifest.js" defer=""></script> + <script src="/_next/static/DEWNAb9qrxKluipBrYTq4/_ssgManifest.js" defer=""></script> </head> <body> <div id="__next"> @@ -753,7 +753,7 @@ "props": { "pageProps": { "statusCode": 404 } }, "page": "/_error", "query": {}, - "buildId": "25Qud6GB6GP8XFN1eDqNi", + "buildId": "DEWNAb9qrxKluipBrYTq4", "nextExport": true, "isFallback": false, "gip": true, diff --git a/out/_next/static/25Qud6GB6GP8XFN1eDqNi/_buildManifest.js b/out/_next/static/DEWNAb9qrxKluipBrYTq4/_buildManifest.js index 5ec6e34..c84d2fe 100644 --- a/out/_next/static/25Qud6GB6GP8XFN1eDqNi/_buildManifest.js +++ b/out/_next/static/DEWNAb9qrxKluipBrYTq4/_buildManifest.js @@ -4,7 +4,7 @@ 'static/chunks/fb7d5399-0d6001c72a29ebec41eb.js', 'static/chunks/d25bd147-2c59edc357c0e2372258.js', 'static/chunks/13-b599b309c84d7675574b.js', - 'static/chunks/pages/index-5e5acac3b4261d15dbc3.js', + 'static/chunks/pages/index-689c814695b38e570f06.js', ], '/_error': ['static/chunks/pages/_error-f5e67a79c709c2df06b8.js'], sortedPages: ['/', '/_app', '/_error'], diff --git a/out/_next/static/25Qud6GB6GP8XFN1eDqNi/_ssgManifest.js b/out/_next/static/DEWNAb9qrxKluipBrYTq4/_ssgManifest.js index 82bedd6..82bedd6 100644 --- a/out/_next/static/25Qud6GB6GP8XFN1eDqNi/_ssgManifest.js +++ b/out/_next/static/DEWNAb9qrxKluipBrYTq4/_ssgManifest.js diff --git a/out/_next/static/chunks/pages/index-5e5acac3b4261d15dbc3.js b/out/_next/static/chunks/pages/index-689c814695b38e570f06.js index 973b286..0c6eb93 100644 --- a/out/_next/static/chunks/pages/index-5e5acac3b4261d15dbc3.js +++ b/out/_next/static/chunks/pages/index-689c814695b38e570f06.js @@ -1825,7 +1825,11 @@ o = r.map(function (e) { return { value: e, label: e } }), - s = (0, u.useState)([]), + s = (0, u.useState)( + n.tags.map(function (e) { + return { value: e, label: e } + }), + ), a = s[0], c = s[1] return (0, l.jsx)(ee.CUIAutoComplete, { @@ -1845,7 +1849,7 @@ ie({}, n), {}, { - tags: a.map(function (e) { + tags: e.selectedItems.map(function (e) { return e.value }), }, @@ -1877,7 +1881,11 @@ o = e.tags.map(function (e) { return { value: e, label: e } }), - s = (0, u.useState)([]), + s = (0, u.useState)( + Object.keys(t).map(function (e) { + return { value: e, label: e } + }), + ), c = s[0], d = s[1] return (0, l.jsxs)(j.xu, { diff --git a/out/index.html b/out/index.html index 43e161a..125c63c 100644 --- a/out/index.html +++ b/out/index.html @@ -19,9 +19,9 @@ <script src="/_next/static/chunks/fb7d5399-0d6001c72a29ebec41eb.js" defer=""></script> <script src="/_next/static/chunks/d25bd147-2c59edc357c0e2372258.js" defer=""></script> <script src="/_next/static/chunks/13-b599b309c84d7675574b.js" defer=""></script> - <script src="/_next/static/chunks/pages/index-5e5acac3b4261d15dbc3.js" defer=""></script> - <script src="/_next/static/25Qud6GB6GP8XFN1eDqNi/_buildManifest.js" defer=""></script> - <script src="/_next/static/25Qud6GB6GP8XFN1eDqNi/_ssgManifest.js" defer=""></script> + <script src="/_next/static/chunks/pages/index-689c814695b38e570f06.js" defer=""></script> + <script src="/_next/static/DEWNAb9qrxKluipBrYTq4/_buildManifest.js" defer=""></script> + <script src="/_next/static/DEWNAb9qrxKluipBrYTq4/_ssgManifest.js" defer=""></script> </head> <body> <div id="__next"> @@ -697,7 +697,7 @@ "props": { "pageProps": {} }, "page": "/", "query": {}, - "buildId": "25Qud6GB6GP8XFN1eDqNi", + "buildId": "DEWNAb9qrxKluipBrYTq4", "nextExport": true, "autoExport": true, "isFallback": false, |