Remove dead legacy selectors from static surfaces#16
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR cleans up two static surface components by removing unused direct Redux hook selectors (useSelector / useDispatch) and associated unused React/Redux hook imports, aiming to reduce unnecessary coupling to model state.
Changes:
- Removed unused
useSelectorreads and related local variables fromsrc/components/Index.tsx. - Removed unused
useSelector/useDispatchreads and related local state fromsrc/components/About.tsx. - Simplified React/Redux imports accordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/components/Index.tsx | Removes unused Redux hook selectors/vars; still has opportunities to fully decouple from Redux and remove now-unused imports. |
| src/components/About.tsx | Removes unused Redux hook selectors/vars; can be further simplified by removing the remaining Redux connection for a static page. |
| @@ -532,5 +515,3 @@ const page = (props) => { | |||
|
|
|||
| } | |||
| export default Page(connect(state => state)(page)); | |||
Comment on lines
+5
to
+7
| import React from "react"; | ||
| import Link from 'next/link'; | ||
| import { connect, useSelector, useDispatch } from 'react-redux'; | ||
| import { connect } from 'react-redux'; |
| @@ -270,4 +260,3 @@ const page = (props) => { | |||
| } | |||
| export default Page(connect(state => state)(page)); | |||
| import React from "react"; | ||
| import Link from 'next/link'; | ||
| import { connect, useSelector, useDispatch } from 'react-redux'; | ||
| import { connect } from 'react-redux'; |
| @@ -2,9 +2,9 @@ | |||
| // Index.tsx | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a small follow-up cleanup slice after the shared universe bridge work.
It removes unused direct legacy Redux selectors from static surfaces that do not need model state.
Changes
useSelectorreads fromsrc/components/About.tsx.useSelectorreads fromsrc/components/Index.tsx.Notes
This does not change rendering behavior. The removed values were not used by the components.
Validation
npm run buildnpm test/aboutloaded successfully onlocalhost:3000and browser console had no errors.