-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1761904
commit bc800bf
Showing
16 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import svg1 from '../images/loading-goose/1.svg'; | ||
import svg2 from '../images/loading-goose/2.svg'; | ||
import svg3 from '../images/loading-goose/3.svg'; | ||
import svg4 from '../images/loading-goose/4.svg'; | ||
import svg5 from '../images/loading-goose/5.svg'; | ||
import svg6 from '../images/loading-goose/6.svg'; | ||
import svg7 from '../images/loading-goose/7.svg'; | ||
|
||
const Example = () => { | ||
const [currentFrame, setCurrentFrame] = useState(0); | ||
const frames = [svg1, svg2, svg3, svg4, svg5, svg6, svg7]; | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
setCurrentFrame((prev) => (prev + 1) % frames.length); | ||
}, 200); // 200ms for smoother animation, adjust as needed | ||
|
||
return () => clearInterval(interval); | ||
}, []); | ||
|
||
return ( | ||
<div> | ||
<img src={frames[currentFrame]} alt={`Animation frame ${currentFrame + 1}`} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Example; |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.