-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve project structure and type organization
- Split types into dedicated files (api, node, storage, transactions) - Move API logic into separate modules - Extract constants into dedicated files - Clean up unused components and imports - Fix type exports and imports - Improve component organization - Remove redundant type definitions
- Loading branch information
Showing
33 changed files
with
1,380 additions
and
1,152 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Button } from '@/components/ui/button'; | ||
import { Separator } from '@/components/ui/separator'; | ||
import { Switch } from '@/components/ui/switch'; | ||
import { Label } from '@/components/ui/label'; | ||
import { RotateCw } from 'lucide-react'; | ||
|
||
interface DashboardControlsProps { | ||
onRefresh: () => void; | ||
isRefreshing: boolean; | ||
isInitialized: boolean; | ||
showNames: boolean; | ||
onShowNamesChange: (value: boolean) => void; | ||
} | ||
|
||
export function DashboardControls({ | ||
onRefresh, | ||
isRefreshing, | ||
isInitialized, | ||
showNames, | ||
onShowNamesChange, | ||
}: DashboardControlsProps) { | ||
return ( | ||
<div className="flex items-center gap-4"> | ||
<Button | ||
variant="outline" | ||
onClick={onRefresh} | ||
disabled={isRefreshing || !isInitialized} | ||
className="gap-2" | ||
> | ||
<RotateCw className={`h-4 w-4 ${isRefreshing ? 'animate-spin' : ''}`} /> | ||
Refresh Data | ||
</Button> | ||
<Separator orientation="vertical" className="h-6" /> | ||
<div className="flex items-center space-x-2"> | ||
<Switch | ||
id="show-names" | ||
checked={showNames} | ||
onCheckedChange={onShowNamesChange} | ||
/> | ||
<Label htmlFor="show-names">Show node names</Label> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.