Skip to content

Commit

Permalink
Fix story
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Aug 23, 2023
1 parent f4ce13e commit 0835ae0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stories/advanced/Feed.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ export const Default: StoryObj = {
const [startFetching, setStartFetching] = useState(false);
const [endFetching, setEndFetching] = useState(false);
const fetchItems = async (isStart?: boolean) => {
setShifting(!!isStart);

if (isStart) {
setShifting(true);
setStartFetching(true);
} else {
setShifting(false);
setEndFetching(true);
}
await new Promise((r) => setTimeout(r, 1000));
Expand Down
4 changes: 2 additions & 2 deletions stories/basics/VList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,11 @@ export const BiDirectionalInfiniteScrolling: StoryObj = {
const [startFetching, setStartFetching] = useState(false);
const [endFetching, setEndFetching] = useState(false);
const fetchItems = async (isStart?: boolean) => {
setShifting(!!isStart);

if (isStart) {
setShifting(true);
setStartFetching(true);
} else {
setShifting(false);
setEndFetching(true);
}
await new Promise((r) => setTimeout(r, 1000));
Expand Down

0 comments on commit 0835ae0

Please sign in to comment.