[BUG]: SocialShareButton logs unconditional console.warn when script is not loaded

Open Beginner friendly
#461 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@vivekrajputofficial29-afk is already working on this.

Since Nov 19, 2026.

  • #470 by @vivekrajputofficial29-afk — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
89/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react

Research direction

Start with the useEffect in src/components/SocialShareButton.jsx around lines 57–59 and check how the existing debug prop is used. Gate or remove the warning as described, then verify that the warning is suppressed when debug is false and available when it is true. Done means normal navigation no longer logs the warning.

Written by the indexing model from the issue text.

Description

bug enhancement
Bug Description
Bug Description

In src/components/SocialShareButton.jsx, an else branch in useEffect logs console.warn('SocialShareButton widget not loaded') on every render where window.SocialShareButton is undefined.

Since the component already accepts a debug prop (defaulting to false), this warning clutters developer and browser console logs during normal runtime and testing environments.

Steps to Reproduce
  1. Open OrgExplorer with browser DevTools / Console open.
  2. Navigate across pages (such as /overview).
  3. Notice SocialShareButton widget not loaded warning in the console.
Location
  • File: src/components/SocialShareButton.jsx
  • Line: 57–59
Proposed Solution

Gate the warning behind the existing debug prop, or remove it so it does not log in normal production/development runs:

} else if (debug) {
  console.warn('SocialShareButton widget not loaded');
}
Impact

Low - Minor inconvenience / Dev ergonomics

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Steps to Reproduce

No response

Logs and Screenshots

No response

Environment Details

No response

Impact

Critical - Application is unusable

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Dominant language
JavaScript
Stars
53
Forks
187
Avg merge
18m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/OrgExplorer

All issues in AOSSIE-Org/OrgExplorer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.