Skip to content

Commit

Permalink
Added Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruler45 committed Feb 26, 2024
1 parent 2cf248e commit 6894b70
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"jsx-a11y/mouse-events-have-key-events": 2,
"jsx-a11y/role-has-required-aria-props": 2,
"jsx-a11y/role-supports-aria-props": 2,
"react-hooks/rules-of-hooks": 2,
"react-hooks/rules-of-hooks": 0,
"import/no-unresolved": [
2,
{ "ignore": ["^@/", "^~/", "^\\.", "^\\.\\."] }
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"sass": "^1.71.1"
},
"devDependencies": {
"@lottiefiles/react-lottie-player": "^3.5.3",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
Expand Down
23 changes: 22 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added public/images/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions public/lottie/loader.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/app/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@
body {
background-color: black;
color: white;
overflow: hidden;
}

.loader {
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
}
16 changes: 15 additions & 1 deletion src/app/loading.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
"use client";

// eslint-disable-next-line import/no-extraneous-dependencies
import { Player } from "@lottiefiles/react-lottie-player";

const loading = () => {
return <div className="loader">Loading...</div>;
return (
<div className="loader">
<Player
autoplay
loop
src="/lottie/loader.json"
style={{ height: "300px", width: "300px" }}
></Player>
</div>
);
};

export default loading;

0 comments on commit 6894b70

Please sign in to comment.