diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9deba1f..2bb6218 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,10 +6,6 @@ on: pull_request: branches: [main] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - permissions: contents: read pages: write diff --git a/.gitignore b/.gitignore index 7b05cb5..c4ef762 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,4 @@ umd .yarn/cache .yarn/install-state.gz stories/*.tsx -storybook-static -coverage \ No newline at end of file +storybook-static \ No newline at end of file diff --git a/src/helpers/animation.server.test.ts b/src/helpers/animation.server.test.ts index 2a7010e..7e8bf23 100644 --- a/src/helpers/animation.server.test.ts +++ b/src/helpers/animation.server.test.ts @@ -11,6 +11,6 @@ describe("animation", () => { "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix" ); - expect(name).toMatch(/^react-spinners-TestLoader-my-suffix/); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); }); }); diff --git a/src/helpers/animation.test.ts b/src/helpers/animation.test.ts index 0e002f0..4067872 100644 --- a/src/helpers/animation.test.ts +++ b/src/helpers/animation.test.ts @@ -7,6 +7,6 @@ describe("createAnimation", () => { "0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}", "my-suffix" ); - expect(name).toMatch(/^react-spinners-TestLoader-my-suffix/); + expect(name).toEqual("react-spinners-TestLoader-my-suffix"); }); }); diff --git a/src/helpers/animation.ts b/src/helpers/animation.ts index 2069f5a..fa2a5d9 100644 --- a/src/helpers/animation.ts +++ b/src/helpers/animation.ts @@ -1,5 +1,5 @@ export const createAnimation = (loaderName: string, frames: string, suffix: string): string => { - const animationName = `react-spinners-${loaderName}-${suffix}-${animationSuffix(10)}`; + const animationName = `react-spinners-${loaderName}-${suffix}`; if (typeof window == "undefined" || !window.document) { return animationName; @@ -21,15 +21,3 @@ export const createAnimation = (loaderName: string, frames: string, suffix: stri return animationName; }; - -function animationSuffix(length: number) { - let result = ""; - const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - const charactersLength = characters.length; - let counter = 0; - while (counter < length) { - result += characters.charAt(Math.floor(Math.random() * charactersLength)); - counter += 1; - } - return result; -}