Skip to content

fix: convert BackToTop component to TypeScript (#127) - #129

Merged
smrithipiedy merged 1 commit into
smrithipiedy:mainfrom
Mohammad-Hassan027:fix/backtotop-jsx-to-tsx
Jul 1, 2026
Merged

fix: convert BackToTop component to TypeScript (#127)#129
smrithipiedy merged 1 commit into
smrithipiedy:mainfrom
Mohammad-Hassan027:fix/backtotop-jsx-to-tsx

Conversation

@Mohammad-Hassan027

Copy link
Copy Markdown
Contributor

Description

Resolves #127.

The BackToTop component was the only .jsx file in the project, causing inconsistency with the standard TypeScript codebase and breaking type-checking for that file.

This PR updates the component to TypeScript.

Changes Made

  • Renamed src/components/BackToTop.jsx to src/components/BackToTop.tsx
  • Added proper explicit TypeScript types:
    • Added JSX.Element | null return type to the component
    • Added <boolean> type generic to the useState hook

Testing

  • Verified that the component still renders correctly and appears when scrolling down.
  • Verified that the layout.tsx import still resolves properly since the extension is omitted.
  • Checked that there are no TypeScript compilation errors.

@smrithipiedy smrithipiedy added enhancement New feature or request SSoC26 A contribution through Social Summer Of Code Easy Easy Issue bug Something isn't working labels Jul 1, 2026
@smrithipiedy
smrithipiedy merged commit b98b1cd into smrithipiedy:main Jul 1, 2026
3 checks passed
@Mohammad-Hassan027
Mohammad-Hassan027 deleted the fix/backtotop-jsx-to-tsx branch July 1, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Easy Easy Issue enhancement New feature or request SSoC26 A contribution through Social Summer Of Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] BackToTop component is .jsx — inconsistent with TypeScript codebase

2 participants