[UPDATE] components hook refactor #72
Merged
+640
−408
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.
This pull request refactors multiple components to improve code modularity and maintainability by extracting logic into reusable hooks. It also removes unused ripple effect styles and related code. The most important changes are grouped by theme below.
Refactoring Components with Hooks
useButtonhook, simplifying theButtoncomponent by moving state and utility functions to the hook (src/components/atoms/button/Button.tsx,src/components/atoms/button/useButton.ts) [1] [2].Headercomponent by moving logic into auseHeaderhook, reducing the complexity of the component (src/components/atoms/header/Header.tsx,src/components/atoms/header/useHeader.ts) [1] [2].IconButtoncomponent into auseIconButtonhook, following the same pattern as other components (src/components/atoms/icon-button/IconButton.tsx,src/components/atoms/icon-button/useIconButton.ts) [1] [2].Inputcomponent by extracting logic into auseInputhook, significantly simplifying the component's implementation (src/components/atoms/input/Input.tsx,src/components/atoms/input/useInput.ts) [1] [2].useLinkhook, streamlining theLinkcomponent (src/components/atoms/link/Link.tsx,src/components/atoms/link/useLink.ts) [1] [2].Removal of Ripple Effect
Button,IconButton, andInputcomponents, as the feature is no longer used (src/components/atoms/button/style.css,src/components/atoms/icon-button/style.css,src/components/atoms/input/Input.tsx) [1] [2].These changes improve the reusability and readability of the codebase while removing unused features.