Even more code styling things
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user