mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
Decompose i18n labels for Unifi widget
- Needed to decompose i18n labels for Unifi widget in order for field visibility setting to work correctly - Fixed weird edge case where a call to cached-fetch would fail if no duration was passed - Have VS Code hide the .next and node_modules folders from tree view
This commit is contained in:
parent
85df467fdb
commit
260201c2b4
4 changed files with 18 additions and 10 deletions
|
@ -1,8 +1,13 @@
|
|||
import cache from "memory-cache";
|
||||
|
||||
const defaultDuration = 5;
|
||||
|
||||
export default async function cachedFetch(url, duration) {
|
||||
const cached = cache.get(url);
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
duration = duration || defaultDuration;
|
||||
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue