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

Bugfix/stop console errors #1330

Conversation

TezzardzGoneWild
Copy link
Contributor

The console has a few errors on profile page load. This removes the errors coming from the below:

  • one of the SVGs had multiple properties using dashes instead of camelCase (ex. stroke-width instead of strokeWidth), and React doesn't read these properly. Same with using class instead of using className
  • two functions mapping arrays to HTML elements had the key on one of the children instead of the parent -- React wants keys on the topmost element when something is mapped

An additional bug was fixed:

  • this.state.alias is mentioned multiple times, but it does exist. This was improperly used causing every tab to have the title hic et nunc - hic et nunc instead of the profile's name (e.g. tezzardz_gone_wild - hic et nunc). This reference has been replaced with this.state.subjkt to fix the bug and other references removed

Several sections of code received some clean up, but no functionality change:

  • onReady included a nested if statement that could be expressed using a single if statement
  • the nested if statement used for filtering OBJKT sale type within creationsForSale can be expressed with two one-line if statements
  • metadata fields are set to null when the state is initialized to give a better indication of what will happen within the component
  • instances where getUserMetadata is called wrote to an intermediate variable and had multiple unnecessary if statements where writing null or undefined would have the same outcome
  • this.state.copied has been renamed to this.state.discordLinkCopied for clarity

@TezzardzGoneWild
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant