-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
edit duplicate variable name #1354
base: main
Are you sure you want to change the base?
edit duplicate variable name #1354
Conversation
@@ -11,13 +11,15 @@ import { | |||
import { APP_VIEWS, setAppView } from 'renderer/store/features/ui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR, please follow the following structure:
- Make a file named DeviceManager.tsx for this file
- In the index.tsx file just do
export { DeviceManager } from './DeviceManager
-> this acts as a export hub for anything you need to export - Create separate file components for the lines of code I am commenting below
<div className="flex items-center gap-2"> | ||
{filteredType === type && <Icon icon="mdi:check" />} | ||
<span | ||
className={cx('capitalize', { | ||
'font-semibold text-black dark:text-white': | ||
filteredType === type, | ||
})} | ||
> | ||
{type} | ||
</span> | ||
</div> | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as the lines 137 to 147, please refactor into a reusable separate component. You could call it DeviceManagerLabel if you'd like, and pass props to it to handle variations
- Moved the DeviceManager logic to a separate DeviceManager.tsx file - Updated imports - Refactored code as per the PR review into separate DeviceManagerLabel.tsx file - Ensured AppContent now correctly references the DeviceManager
✨ Pull Request
📓 Referenced Issue
Fixes: #1327
ℹ️ About the PR
This PR adds a filter dropdown to streamline device selection by type (e.g., Phone, Tablet). Users can now filter devices by type or select "All Device Types" to view everything.
I am not sure if the Search Bar is suppose to remain or not. So currently the search bar is still included and works along side the filter dropdown.
🖼️ Testing Scenarios / Screenshots