Even more code styling things

This commit is contained in:
2023-07-31 12:41:19 +03:00
parent 9eb30d2066
commit 9b35a54ae9
51 changed files with 127 additions and 113 deletions

View File

@ -12,7 +12,7 @@ function useStoryIndex(annLength: number | undefined) {
setIndex(0)
setSearchParams(prev => ({
...Object.fromEntries(prev),
storyIndex: '0'
storyIndex: '0',
}), { replace: true })
f(...args)
}
@ -29,7 +29,7 @@ function useStoryIndex(annLength: number | undefined) {
const newIndex = (prev + 1) % (annLength || 1)
setSearchParams(prev => ({
...Object.fromEntries(prev),
storyIndex: newIndex.toString()
storyIndex: newIndex.toString(),
}), { replace: true })
return newIndex
@ -39,7 +39,7 @@ function useStoryIndex(annLength: number | undefined) {
const newIndex = prev > 0 ? (prev - 1) : 0
setSearchParams(prev => ({
...Object.fromEntries(prev),
storyIndex: newIndex.toString()
storyIndex: newIndex.toString(),
}), { replace: true })
return newIndex
@ -49,7 +49,7 @@ function useStoryIndex(annLength: number | undefined) {
n: index,
withReset,
increment,
decrement
decrement,
}
}