forked from AkkomaGang/akkoma-fe
don't use cache for theme data
This commit is contained in:
parent
786a695eb6
commit
29133fb008
1 changed files with 4 additions and 2 deletions
|
@ -313,7 +313,9 @@ export const generatePreset = (input) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getThemes = () => {
|
export const getThemes = () => {
|
||||||
return window.fetch('/static/styles.json')
|
const cache = 'no-store'
|
||||||
|
|
||||||
|
return window.fetch('/static/styles.json', { cache })
|
||||||
.then((data) => data.json())
|
.then((data) => data.json())
|
||||||
.then((themes) => {
|
.then((themes) => {
|
||||||
return Object.entries(themes).map(([k, v]) => {
|
return Object.entries(themes).map(([k, v]) => {
|
||||||
|
@ -321,7 +323,7 @@ export const getThemes = () => {
|
||||||
if (typeof v === 'object') {
|
if (typeof v === 'object') {
|
||||||
promise = Promise.resolve(v)
|
promise = Promise.resolve(v)
|
||||||
} else if (typeof v === 'string') {
|
} else if (typeof v === 'string') {
|
||||||
promise = window.fetch(v)
|
promise = window.fetch(v, { cache })
|
||||||
.then((data) => data.json())
|
.then((data) => data.json())
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
|
Loading…
Reference in a new issue