push-protocol / push-dapp

The Push Protocol Dapp
https://app.push.org
Other
45 stars 39 forks source link

UserPushSDKInstance returns null randomly on dapp #1763

Closed corlard3y closed 2 months ago

corlard3y commented 2 months ago

Pull Request Template

1718

Description

Type of Change

Checklist

Frontend Guidelines

Build & Testing

Screenshots/Video with Explanation

Additional Context

Review & Approvals

Notes

github-actions[bot] commented 2 months ago

There are some issues in the code snippet provided:

  1. There is a typo in the function setcurrentTime, it should be setCurrentTime with a capital 'C'.
  2. The function extendConsole is defined but not being called, consider removing it if it's unnecessary.
  3. There is a missing closing brace } after console.enable('warn', false); inside the if (appConfig?.appEnv === 'prod') block.
  4. There are unused imports that can be removed to clean up the code.
  5. Inside the if (!mounted.current) block, there is a missing closing brace } after the resetState(); call.
  6. The useEffect hook is missing its dependency array in the App component, you should pass [account] as the second argument.
  7. Inside the toggleDarkMode function, there is a missing closing brace after the document.documentElement.setAttribute('theme', theme);.
  8. The SidebarCollapsable variable is misspelled, it should be SidebarCollapsible.

After addressing those issues, the code looks good.

github-actions[bot] commented 2 months ago

PR Preview Action v1.4.7 :---: Preview removed because the pull request was closed. 2024-07-24 09:47 UTC

github-actions[bot] commented 2 months ago

In the App.tsx file:

  1. There are some typos, for example, the function name setcurrentTime should be corrected to setCurrentTime.
  2. There is a missing curly brace } after the first if condition block before the if (appConfig?.appEnv === 'prod').
  3. There is a missing closing curly brace } at the end of the file after the last ... ellipsis.

Other than these issues, the code seems to be sound regarding logic and structure.

In the yarn.lock file: All looks good.