Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fireworks particles on click to the pricing page #515

Closed
wants to merge 9 commits into from

Conversation

sweep-nightly[bot]
Copy link
Contributor

@sweep-nightly sweep-nightly bot commented Sep 28, 2023

Description

This PR adds the functionality to display fireworks particles on click to the pricing page. It installs the "tsparticles-preset-fireworks" package and modifies the PricingPage component to include the fireworks particles.

Summary of Changes

  • Added the "tsparticles-preset-fireworks" package to the project dependencies.
  • Modified the PricingPage component to import the necessary modules from the "tsparticles" and "tsparticles-preset-fireworks" packages.
  • Loaded the "Fireworks" preset using the "tsParticles.addPreset" method.
  • Initialized tsParticles on the PricingPage component using the "tsParticles.load" method.
  • Added a "click" event listener to the PricingPage component to trigger the fireworks particles on click.

Please review and merge this PR to add fireworks particles on click to the pricing page.

Fixes #509.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@netlify
Copy link

netlify bot commented Sep 28, 2023

Deploy Preview for sweepdev failed.

Name Link
🔨 Latest commit ccf83af
🔍 Latest deploy log https://app.netlify.com/sites/sweepdev/deploys/6515c67c1aeff30008c07229

@netlify
Copy link

netlify bot commented Sep 28, 2023

Deploy Preview for papaya-pothos-8db6ca failed.

Name Link
🔨 Latest commit ccf83af
🔍 Latest deploy log https://app.netlify.com/sites/papaya-pothos-8db6ca/deploys/6515c67c0b446f000883ffac

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

##[error]src/components/PricingPage.tsx(3,37): error TS2307: Cannot find module 'tsparticles-preset-fireworks' or its corresponding type declarations.
##[error]src/components/PricingPage.tsx(8,3): error TS2304: Cannot find name 'useEffect'.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

🚀 Wrote Changes

##[error]src/components/PricingPage.tsx(3,37): error TS2307: Cannot find module 'tsparticles-preset-fireworks' or its corresponding type declarations.
##[error]src/components/PricingPage.tsx(8,3): error TS2304: Cannot find name 'useEffect'.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

Hi @sweep-nightly[bot],

I decided to make the following changes:

File Path Proposed Changes
src/components/PricingPage.tsx Modify src/components/PricingPage.tsx with contents:
• At the top of the file, add import { useEffect } from 'react'; to import the useEffect hook from react.
package.json Modify package.json with contents:
• Run yarn add tsparticles-preset-fireworks in the terminal to add the tsparticles-preset-fireworks module to the project dependencies.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

##[error]src/components/PricingPage.tsx(1,41): error TS2724: '"@chakra-ui/react"' has no exported member named 'useEffect'. Did you mean 'effect'?
##[error]src/components/PricingPage.tsx(3,37): error TS2307: Cannot find module 'tsparticles-preset-fireworks' or its corresponding type declarations.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

🚀 Wrote Changes

##[error]src/components/PricingPage.tsx(1,41): error TS2724: '"@chakra-ui/react"' has no exported member named 'useEffect'. Did you mean 'effect'?
##[error]src/components/PricingPage.tsx(3,37): error TS2307: Cannot find module 'tsparticles-preset-fireworks' or its corresponding type declarations.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

Hi @sweep-nightly[bot],

I decided to make the following changes:

File Path Proposed Changes
src/components/PricingPage.tsx Modify src/components/PricingPage.tsx with contents:
• Replace the line 'import { Text, SimpleGrid, Box, Button, useEffect } from '@chakra-ui/react'; with 'import { Text, SimpleGrid, Box, Button } from '@chakra-ui/react';' and 'import { useEffect } from 'react';'.
package.json Modify package.json with contents:
• Add the 'tsparticles-preset-fireworks' module to the dependencies by running 'npm install tsparticles-preset-fireworks' or 'yarn add tsparticles-preset-fireworks'.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

##[error]src/components/PricingPage.tsx(1,41): error TS2724: '"@chakra-ui/react"' has no exported member named 'useEffect'. Did you mean 'effect'?
##[error]src/components/PricingPage.tsx(5,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

error An unexpected error occurred: "/home/runner/work/landing-page/landing-page/package.json: Unexpected token , in JSON at position 1276".
info If you think this is a bug, please open a bug report with the information provided in "/home/runner/work/landing-page/landing-page/yarn-error.log".

The command that failed is yarn install.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is npm install. Here are the relevant lines from the logs:

npm ERR! code EJSONPARSE
npm ERR! file /home/runner/work/landing-page/landing-page/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token "," (0x2C) in JSON at position 1276 while parsing near "...: \"^2.1.4\"\n    }\n  },\n  \"scripts\": {\n   ..."
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-09-28T18_08_42_102Z-debug.log

Please refer to the /home/runner/.npm/_logs/2023-09-28T18_08_42_102Z-debug.log file for a complete log of this run.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is npm install. Here are the relevant lines from the logs:

npm ERR! code EJSONPARSE
npm ERR! file /home/runner/work/landing-page/landing-page/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token "," (0x2C) in JSON at position 1276 while parsing near "...: \"^2.1.4\"\n    }\n  },\n  \"scripts\": {\n   ..."
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-09-28T18_08_43_155Z-debug.log

Please refer to the /home/runner/.npm/_logs/2023-09-28T18_08_43_155Z-debug.log file for a complete log of this run.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

"tsparticles-preset-confetti": "^1.0.0",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
"@chakra-ui/icons": "^2.0.18",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unindent the code here

Copy link
Contributor Author

@sweep-nightly sweep-nightly bot Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

error An unexpected error occurred: "/home/runner/work/landing-page/landing-page/package.json: Unexpected token , in JSON at position 1274".
info If you think this is a bug, please open a bug report with the information provided in "/home/runner/work/landing-page/landing-page/yarn-error.log".

The command that failed is yarn install.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is npm install. Here are the relevant lines from the logs:

npm ERR! code EJSONPARSE
npm ERR! file /home/runner/work/landing-page/landing-page/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token "," (0x2C) in JSON at position 1274 while parsing near "...s\": \"^2.1.4\"\n  }\n  },\n  \"scripts\": {\n   ..."
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-09-28T18_20_39_093Z-debug.log

Please refer to the /home/runner/.npm/_logs/2023-09-28T18_20_39_093Z-debug.log file for a complete log of this run.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is npm install. Here are the relevant lines from the logs:

npm ERR! code EJSONPARSE
npm ERR! file /home/runner/work/landing-page/landing-page/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token "," (0x2C) in JSON at position 1274 while parsing near "...s\": \"^2.1.4\"\n  }\n  },\n  \"scripts\": {\n   ..."
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-09-28T18_20_40_790Z-debug.log

Please refer to the /home/runner/.npm/_logs/2023-09-28T18_20_40_790Z-debug.log file for a complete log of this run.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

package.json Outdated
"tsparticles-preset-fireworks": "^1.0.0",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this

Copy link
Contributor Author

@sweep-nightly sweep-nightly bot Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
error Command failed with exit code 2.

The command that failed is yarn run tsc.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@wwzeng1
Copy link
Contributor

wwzeng1 commented Sep 28, 2023

##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
error Command failed with exit code 2.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

🚀 Wrote Changes

##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
error Command failed with exit code 2.

Hi @wwzeng1,

I decided to make the following changes:

File Path Proposed Changes
src/components/PricingPage.tsx Modify src/components/PricingPage.tsx with contents:
• Import the IOptions type from the tsparticles package at the top of the file.
• Replace the tsParticles.load calls in the useEffect hook and the onClick handler with calls to tsParticles.loadJSON. The first argument should be the same, but the second argument should be a JSON string that represents an options object.
• The options object should have a particles property with an interactivity property. The interactivity property should have an events property with an onClick property. The onClick property should be an object with a enable property set to true and a mode property set to "repulse".
• The options object should also have a fpsLimit property set to 60, a background property with a color property set to "#0d1117", and a motion property with a disable property set to false.
• The options object should also have a particles property with a number property. The number property should be an object with a value property set to 80 and a density property. The density property should be an object with an enable property set to true and a value_area property set to 800.
• The options object should also have a particles property with a color property. The color property should be an object with a value property set to "#ff0000".
• The options object should also have a particles property with a shape property. The shape property should be an object with a type property set to "circle".
• The options object should also have a particles property with a opacity property. The opacity property should be an object with a value property set to 0.5, a random property set to false, and an animation property. The animation property should be an object with a enable property set to false, a speed property set to 1, and a opacity_min property set to 0.1.
• The options object should also have a particles property with a size property. The size property should be an object with a value property set to 5, a random property set to true, and an animation property. The animation property should be an object with a enable property set to false, a speed property set to 30, and a size_min property set to 0.1.
• The options object should also have a particles property with a links property. The links property should be an object with a enable property set to false.
• The options object should also have a particles property with a move property. The move property should be an object with a enable property set to true, a speed property set to 3, a direction property set to "none", a random property set to false, a straight property set to false, an out_mode property set to "out", and a bounce property set to false.
• The options object should also have a particles property with a line_linked property. The line_linked property should be an object with a enable property set to false.
• The options object should also have a particles property with a life property. The life property should be an object with a duration property set to 2, a count property set to 1, and a delay property set to 0.
• The options object should also have a particles property with a vortex property. The vortex property should be an object with a enable property set to false.
• The options object should also have a interactivity property with a detect_on property set to "canvas", and an events property. The events property should be an object with an onhover property and an onclick property. The onhover property should be an object with a enable property set to false. The onclick property should be an object with a enable property set to true and a mode property set to "repulse".
• The options object should also have a interactivity property with a modes property. The modes property should be an object with a grab property, a bubble property, a repulse property, a push property, a remove property. All these properties should be objects with an enable property set to false.
• The options object should also have a retina_detect property set to false.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is npm run lint. Here are the relevant lines from the logs:

##[error]    8:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]    8:10  warning  'Text' is already defined                                                                                   @typescript-eslint/no-redeclare
##[warning]    8:16  warning  'SimpleGrid' is already defined                                                                             @typescript-eslint/no-redeclare
##[warning]    8:28  warning  'Box' is already defined                                                                                    @typescript-eslint/no-redeclare
##[warning]    8:33  warning  'Button' is already defined                                                                                 @typescript-eslint/no-redeclare
##[error]    9:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]    9:10  warning  'useEffect' is already defined                                                                              @typescript-eslint/no-redeclare
##[error]   10:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]   10:10  warning  'tsParticles' is already defined                                                                            @typescript-eslint/no-redeclare
##[error]   11:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]   11:10  warning  'loadFireworksPreset' is already defined                                                                    @typescript-eslint/no-redeclare
##[warning]  114:6   warning  React Hook useEffect has a missing dependency: 'options'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

✖ 12 problems (4 errors, 8 warnings)
2 errors and 0 warnings potentially fixable with the `--fix` option.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sweep-landing-page@0.1.0 lint: `eslint . --ext .ts,.tsx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sweep-landing-page@0.1.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

🚀 Wrote Changes

The command that failed is npm run lint. Here are the relevant lines from the logs:

##[error]    8:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]    8:10  warning  'Text' is already defined                                                                                   @typescript-eslint/no-redeclare
##[warning]    8:16  warning  'SimpleGrid' is already defined                                                                             @typescript-eslint/no-redeclare
##[warning]    8:28  warning  'Box' is already defined                                                                                    @typescript-eslint/no-redeclare
##[warning]    8:33  warning  'Button' is already defined                                                                                 @typescript-eslint/no-redeclare
##[error]    9:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]    9:10  warning  'useEffect' is already defined                                                                              @typescript-eslint/no-redeclare
##[error]   10:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]   10:10  warning  'tsParticles' is already defined                                                                            @typescript-eslint/no-redeclare
##[error]   11:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]   11:10  warning  'loadFireworksPreset' is already defined                                                                    @typescript-eslint/no-redeclare
##[warning]  114:6   warning  React Hook useEffect has a missing dependency: 'options'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

✖ 12 problems (4 errors, 8 warnings)
2 errors and 0 warnings potentially fixable with the `--fix` option.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sweep-landing-page@0.1.0 lint: `eslint . --ext .ts,.tsx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sweep-landing-page@0.1.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

Hi @sweep-nightly[bot],

I decided to make the following changes:

File Path Proposed Changes
src/components/PricingPage.tsx Modify src/components/PricingPage.tsx with contents:
• Remove the duplicate imports of Text, SimpleGrid, Box, Button, useEffect, tsParticles, and loadFireworksPreset.
• Add 'options' as a dependency in the useEffect hook.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is yarn run tsc. Here are the relevant lines from the logs:

##[error]src/components/PricingPage.tsx(1,10): error TS2300: Duplicate identifier 'Text'.
##[error]src/components/PricingPage.tsx(1,16): error TS2300: Duplicate identifier 'SimpleGrid'.
##[error]src/components/PricingPage.tsx(1,28): error TS2300: Duplicate identifier 'Box'.
##[error]src/components/PricingPage.tsx(1,33): error TS2300: Duplicate identifier 'Button'.
##[error]src/components/PricingPage.tsx(2,10): error TS2300: Duplicate identifier 'useEffect'.
##[error]src/components/PricingPage.tsx(3,10): error TS2300: Duplicate identifier 'tsParticles'.
##[error]src/components/PricingPage.tsx(4,10): error TS2300: Duplicate identifier 'loadFireworksPreset'.
##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
##[error]src/components/PricingPage.tsx(8,10): error TS2300: Duplicate identifier 'Text'.
##[error]src/components/PricingPage.tsx(8,16): error TS2300: Duplicate identifier 'SimpleGrid'.
##[error]src/components/PricingPage.tsx(8,28): error TS2300: Duplicate identifier 'Box'.
##[error]src/components/PricingPage.tsx(8,33): error TS2300: Duplicate identifier 'Button'.
##[error]src/components/PricingPage.tsx(9,10): error TS2300: Duplicate identifier 'useEffect'.
##[error]src/components/PricingPage.tsx(10,10): error TS2300: Duplicate identifier 'tsParticles'.
##[error]src/components/PricingPage.tsx(11,10): error TS2300: Duplicate identifier 'loadFireworksPreset'.
##[error]src/components/PricingPage.tsx(13,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
##[error]src/components/PricingPage.tsx(18,5): error TS2739: Type '{ color: string; }' is missing the following properties from type 'IBackground': image, opacity, position, repeat, size
##[error]src/components/PricingPage.tsx(21,5): error TS2741: Property 'reduce' is missing in type '{ disable: false; }' but required in type 'IMotion'.
##[error]src/components/PricingPage.tsx(27,9): error TS2739: Type '{ enable: true; value_area: number; }' is missing the following properties from type 'IDensity': area, factor
##[error]src/components/PricingPage.tsx(32,7): error TS2741: Property 'animation' is missing in type '{ value: string; }' but required in type 'IAnimatableColor'.
##[error]src/components/PricingPage.tsx(35,7): error TS2740: Type '{ type: string; }' is missing the following properties from type 'IShape': stroke, polygon, character, image, and 3 more.
##[error]src/components/PricingPage.tsx(41,9): error TS2739: Type '{ enable: false; speed: number; opacity_min: number; }' is missing the following properties from type 'IOpacityAni


There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

The command that failed is yarn run tsc. Here are the relevant lines from the logs:

##[error]src/components/PricingPage.tsx(1,10): error TS2300: Duplicate identifier 'Text'.
##[error]src/components/PricingPage.tsx(1,16): error TS2300: Duplicate identifier 'SimpleGrid'.
##[error]src/components/PricingPage.tsx(1,28): error TS2300: Duplicate identifier 'Box'.
##[error]src/components/PricingPage.tsx(1,33): error TS2300: Duplicate identifier 'Button'.
##[error]src/components/PricingPage.tsx(2,10): error TS2300: Duplicate identifier 'useEffect'.
##[error]src/components/PricingPage.tsx(3,10): error TS2300: Duplicate identifier 'tsParticles'.
##[error]src/components/PricingPage.tsx(4,10): error TS2300: Duplicate identifier 'loadFireworksPreset'.
##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
##[error]src/components/PricingPage.tsx(8,10): error TS2300: Duplicate identifier 'Text'.
##[error]src/components/PricingPage.tsx(8,16): error TS2300: Duplicate identifier 'SimpleGrid'.
##[error]src/components/PricingPage.tsx(8,28): error TS2300: Duplicate identifier 'Box'.
##[error]src/components/PricingPage.tsx(8,33): error TS2300: Duplicate identifier 'Button'.
##[error]src/components/PricingPage.tsx(9,10): error TS2300: Duplicate identifier 'useEffect'.
##[error]src/components/PricingPage.tsx(10,10): error TS2300: Duplicate identifier 'tsParticles'.
##[error]src/components/PricingPage.tsx(11,10): error TS2300: Duplicate identifier 'loadFireworksPreset'.
##[error]src/components/PricingPage.tsx(13,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
##[error]src/components/PricingPage.tsx(18,5): error TS2739: Type '{ color: string; }' is missing the following properties from type 'IBackground': image, opacity, position, repeat, size
##[error]src/components/PricingPage.tsx(21,5): error TS2741: Property 'reduce' is missing in type '{ disable: false; }' but required in type 'IMotion'.
##[error]src/components/PricingPage.tsx(27,9): error TS2739: Type '{ enable: true; value_area: number; }' is missing the following properties from type 'IDensity': area, factor
##[error]src/components/PricingPage.tsx(32,7): error TS2741: Property 'animation' is missing in type '{ value: string; }' but required in type 'IAnimatableColor'.
##[error]src/components/PricingPage.tsx(35,7): error TS2740: Type '{ type: string; }' is missing the following properties from type 'IShape': stroke, polygon, character, image, and 3 more.
##[error]src/components/PricingPage.tsx(41,9): error TS2739: Type '{ enable: false; speed: number; opacity_min: number; }' is missing the following properties from type 'IOpacityAni


There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

Hi @sweep-nightly[bot],

I decided to make the following changes:

File Path Proposed Changes
src/components/PricingPage.tsx Modify src/components/PricingPage.tsx with contents:
• Remove the duplicated imports of Text, SimpleGrid, Box, Button, useEffect, tsParticles, and loadFireworksPreset at the top of the file.
• Correct the arguments passed to the tsParticles.addPreset method. The first argument should be a string representing the preset name, and the second argument should be a function that takes an Engine object and returns a RecursivePartial<IOptions> object.
• Correct the structure of the options object to match the IOptions interface. Ensure that all required properties are included and that their values are of the correct type.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is npm run lint. Here are the relevant lines from the logs:

##[error]    8:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]    8:10  warning  'Text' is already defined                                                                                   @typescript-eslint/no-redeclare
##[warning]    8:16  warning  'SimpleGrid' is already defined                                                                             @typescript-eslint/no-redeclare
##[warning]    8:28  warning  'Box' is already defined                                                                                    @typescript-eslint/no-redeclare
##[warning]    8:33  warning  'Button' is already defined                                                                                 @typescript-eslint/no-redeclare
##[error]    9:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]    9:10  warning  'useEffect' is already defined                                                                              @typescript-eslint/no-redeclare
##[error]   10:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]   10:10  warning  'tsParticles' is already defined                                                                            @typescript-eslint/no-redeclare
##[error]   11:1   error    Import in body of module; reorder to top                                                                    import/first
##[warning]   11:10  warning  'loadFireworksPreset' is already defined                                                                    @typescript-eslint/no-redeclare
##[warning]  114:6   warning  React Hook useEffect has a missing dependency: 'options'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

✖ 12 problems (4 errors, 8 warnings)
2 errors and 0 warnings potentially fixable with the `--fix` option.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sweep-landing-page@0.1.0 lint: `eslint . --ext .ts,.tsx`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sweep-landing-page@0.1.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Sep 28, 2023

GitHub actions yielded the following error.

The command that failed is yarn run tsc. Here are the relevant lines from the logs:

##[error]src/components/PricingPage.tsx(6,36): error TS2345: Argument of type '(engine: Engine) => void' is not assignable to parameter of type 'RecursivePartial<IOptions>'.
Index signature for type 'string' is missing in type '(engine: Engine) => void'.
##[error]src/components/PricingPage.tsx(11,5): error TS2739: Type '{ color: string; }' is missing the following properties from type 'IBackground': image, opacity, position, repeat, size
##[error]src/components/PricingPage.tsx(14,5): error TS2741: Property 'reduce' is missing in type '{ disable: false; }' but required in type 'IMotion'.
##[error]src/components/PricingPage.tsx(20,9): error TS2739: Type '{ enable: true; value_area: number; }' is missing the following properties from type 'IDensity': area, factor
##[error]src/components/PricingPage.tsx(25,7): error TS2741: Property 'animation' is missing in type '{ value: string; }' but required in type 'IAnimatableColor'.
##[error]src/components/PricingPage.tsx(28,7): error TS2740: Type '{ type: string; }' is missing the following properties from type 'IShape': stroke, polygon, character, image, and 3 more.
##[error]src/components/PricingPage.tsx(34,9): error TS2739: Type '{ enable: false; speed: number; opacity_min: number; }' is missing the following properties from type 'IOpacityAnimation': destroy, startValue, count, sync
##[error]src/components/PricingPage.tsx(43,9): error TS2739: Type '{ enable: false; speed: number; size_min: number; }' is missing the following properties from type 'ISizeAnimation': destroy, startValue, count, sync
##[error]src/components/PricingPage.tsx(49,7): error TS2740: Type '{ enable: false; }' is missing the following properties from type 'ILinks': blink, color, consent, distance, and 6 more.
##[error]src/components/PricingPage.tsx(52,7): error TS2740: Type '{ enable: true; speed: number; direction: "none"; random: false; straight: false; out_mode: "out"; bounce: false; }' is missing the following properties from type 'IMove': collisions, outMode, noise, angle, and 12 more.
##[error]src/components/PricingPage.tsx(61,7): error TS2740: Type '{ enable: false; }' is missing the following properties from type 'ILinks': blink, color, consent, distance, and 6 more.
##[error]src/components/PricingPage.tsx(65,9): error TS2322: Type 'number' is not assignable to type 'ILifeDuration'.
##[error]src/components/PricingPage.tsx(67,9): error TS2322: Type 'number' is not assignable to type 'ILifeDelay'.
##[error]src/components/PricingPage.tsx(76,9): error TS2739: Type '{ enable: false; }' is missing the following properties from type 'IHoverEvent': mode, parallax
##[error]src/components/PricingPage.tsx(86,11): error TS2322: Type '{ enable: false; }' is not assignable to type 'IGrab'.
Object literal may only specify known properties, and 'enable' does not exist in type 'IGrab'.
##[error]src/components/PricingPage.tsx(89,11): error TS2322: Type '{ enable: false; }' is not assignable to type 'IBubble'.
Object literal may only specify known properties, and 'enable' does not exist in type 'IBubble'.
##[error]src/components/PricingPage.tsx(92,11): error TS2322: Type '{ enable: false; }' is not assignable to type 'IRepulse'.
Object literal may only specify known properties, and 'enable' does not exist in type 'IRepulse'.
##[error]src/components/PricingPage.tsx(95,11): error TS2322: Type '{ enable: false; }' is not assignable to type 'IPush'.
Object literal may only specify known properties, and 'enable' does not exist in type 'IPush'.
##[error]src/components/PricingPage.tsx(98,11): error TS2322: Type '{ enable: false; }' is not assignable to type 'IRemove'.
Object literal may only specify known properties, and 'enable' does not exist in type 'IRemove'.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-nightly sweep-nightly bot closed this Sep 29, 2023
@sweep-nightly sweep-nightly bot deleted the sweep/fireworks-particles branch September 29, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Add fireworks particles on click to the pricing page
1 participant