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

issue #729 Achievement notifications are broken #737

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

smit309
Copy link
Contributor

@smit309 smit309 commented Jan 10, 2024


title: Issue #729 Achievement notifications are broken

Discord Username: @smit309

What type of PR is this? (select all that apply)

  • 🐛 Bug Fix

Description

  1. Change in Name Cell Rendering:

Original:

return {snippet.name ?? "-"}

Modified:

return {snippet?.name ?? "-"};

Description: Introduced optional chaining (?.) to ensure that the name property is accessed only if snippet is defined.

  1. Change in Language Cell Rendering:

Original:

const language = snippetLanguages.find((language) => {
if (language.value === snippet.language) {
return language.label;
}
});
return language?.label;

Modified:

const language = snippet?.language
? snippetLanguages.find((lang) => lang.value === snippet.language)?.label
: null;
return {language ?? "-"};

Description: Refactored the language lookup to use optional chaining and nullish coalescing, ensuring safe access to snippet and snippet.language.

Related Tickets & Documents

  • Related Issue #
  • Closes #

Devices:
Chrome Version 120.0.6099.200 (Official Build) (64-bit)

QA Instructions, Screenshots, Recordings

image

[optional] Are there any post deployment tasks we need to perform?

NO

[optional] What gif best describes this PR or how it makes you feel?

Well, This is my first PR in this website so I understood code very well and i'll do my best to make this website perfect. Thank you. If there is mistake or making this Pr description let me know.

@TyrinH TyrinH merged commit 3d8920b into webdevcody:main Jul 24, 2024
1 of 4 checks passed
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.

2 participants