turbo-eth / template-web3-app

⚡️ Web3 App Template built using Next.js, RainbowKit, SIWE, Disco, and more!
https://www.turboeth.xyz
MIT License
321 stars 89 forks source link

[integrations] Refactor: template enhancements #94

Closed marthendalnunes closed 1 year ago

marthendalnunes commented 1 year ago

This Pull Request introduces several codebase enhancements to TurboETH that maintain the existing feature set and functionality of the template. The enhancements focus on code cleanliness, readability, consistency, and improved TypeScript enforcement.

Key Changes:

  1. Refactor: Reorganization of Client/Server Components - Restructures the component tree by moving the client/server boundary down, thereby converting certain client components without hooks into server components. This change aligns with the recommendations given in the Next.js documentation.

  2. Refactor: Consistent React Import Usage - Converts default React imports into named imports for improved code consistency. This change also eliminates unnecessary default React imports.

  3. Refactor: TypeScript Enforcement - Eliminates the use of @ts-ignore and @ts-nocheck, enhancing TypeScript enforcement by resolving incorrect type definitions.

  4. Chore: Removal of Unused Packages - Purges unused packages and correctly reclassifies @types packages as dev dependencies.

  5. Chore: Replacing SWR with @tanstack/react-query - Swaps out SWR, used only in the useUser hook, with @tanstack/react-query, thereby eliminating the SWRConfig provider.

  6. Refactor: Implementation of TypeScript-ESLint and Prettier - Adds stricter TypeScript ESLint via @typescript-eslint and applies Prettier for enhanced code formatting.

  7. Feature: CI Action Addition - Implements a GitHub action to perform CI for code formatting and linting, addressing issues missed by Vercel's CI.

  8. Chore: Import Replacement - Replaces clsx imports with the cn utility, which leverages clsx in conjunction with tailwind-merge.

  9. Chore: Enhanced Component Interface Typing - Expands component interfaces with HTML attributes and forwards the props appropriately.

  10. Refactor: Branch Pattern Replacement - Shifts from the branch pattern used in multiple components to the single-responsibility component approach, featuring components like IsSignedIn and IsSignedOut.

  11. Docs: Updated Integration README - Modifies the integrations README files to reflect the changes stated above.

  12. Refactor: Replace @turbo-eth/core-wagmi with Local Components - This update eliminates components from @turbo-eth/core-wagmi and substitutes them with locally sourced components.

  13. Chore: Swap lucide-react with react-icons - This change involves removing lucid-react from the repository and replacing the icons with Lucide icons from the react-icons package.

  14. chore: remove rainbowkit as an integration - Removes rainbowkit integration page and navbar link.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
light-turbo-eth ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2023 2:00pm
turbo-eth ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2023 2:00pm