mahmoudilyan / marketing-campaign

Send marketing messages at scale 📮
https://dittofeed.com/
MIT License
0 stars 0 forks source link

Sweep: Make dashboard package as seperate #3

Open mahmoudilyan opened 1 year ago

mahmoudilyan commented 1 year ago

In packages/dashboard. I want you to seperate the code and make it work by itself, with dummy data in the API folder that uses next.js. Let it work smoothly by removing dependency of other packages

sweep-ai[bot] commented 1 year ago

80% ⭐ In the meantime, consider starring our repo so more people can hear about us!


Step 1: 🔍 Code Search

I found the following snippets in your repository. I will now analyze this snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/mahmoudilyan/marketing-campaign/blob/15f158b54d47a3573bb8cbb7b53da7606a6e0f76/packages/dashboard/next.config.js#L1-L31 https://github.com/mahmoudilyan/marketing-campaign/blob/15f158b54d47a3573bb8cbb7b53da7606a6e0f76/packages/dashboard/package.json#L1-L86 https://github.com/mahmoudilyan/marketing-campaign/blob/15f158b54d47a3573bb8cbb7b53da7606a6e0f76/packages/dashboard/src/pages/api/index.page.ts#L1-L8 https://github.com/mahmoudilyan/marketing-campaign/blob/15f158b54d47a3573bb8cbb7b53da7606a6e0f76/packages/dashboard/src/components/journeys/sidebar.tsx#L1-L58 https://github.com/mahmoudilyan/marketing-campaign/blob/15f158b54d47a3573bb8cbb7b53da7606a6e0f76/packages/dashboard/src/pages/journeys/[id]/configure.page.tsx#L1-L83

Step 2: 🧐 Snippet Analysis

From looking through the relevant snippets, I decided to make the following modifications:

File Path Proposed Changes
packages/dashboard/package.json Update the scripts and dependencies to ensure that the dashboard package can be installed and run independently.
packages/dashboard/src/pages/api/index.page.ts Replace the current handler function with a function that returns dummy data.
packages/dashboard/src/components/journeys/sidebar.tsx Replace the import statements that reference other packages with dummy data or mock functions.
packages/dashboard/src/pages/journeys/[id]/configure.page.tsx Replace the import statements that reference other packages with dummy data or mock functions.
packages/dashboard/next.config.js Update the configuration to ensure that the dashboard package can be built and run independently.

Step 3: 📝 Planning

I have created a plan for writing the pull request. I am now working on executing my plan and coding the required changes to address this issue. Here is the planned pull request:

Separate Dashboard Package sweep/separate-dashboard-package

This PR addresses issue #3 by making the dashboard package function independently of the other packages in the repository.

Changes include:

  • Updating the scripts and dependencies in packages/dashboard/package.json to ensure that the dashboard package can be installed and run independently.
  • Replacing the current handler function in packages/dashboard/src/pages/api/index.page.ts with a function that returns dummy data.
  • Replacing the import statements that reference other packages in packages/dashboard/src/components/journeys/sidebar.tsx and packages/dashboard/src/pages/journeys/[id]/configure.page.tsx with dummy data or mock functions.
  • Updating the configuration in packages/dashboard/next.config.js to ensure that the dashboard package can be built and run independently.

These changes allow the dashboard package to function as a standalone package, with dummy data in the API folder that uses Next.js.

Please review and let me know if any changes are required.


Step 4: ⌨️ Coding

I have finished coding the issue. I am now reviewing it for completeness.


I'm a bot that handles simple bugs and feature requests but I might make mistakes. Please be kind! Join Our Discord