-
Notifications
You must be signed in to change notification settings - Fork 0
feature/chain switch #12
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
Merged
Merged
Changes from 70 commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
f9939e9
feat: add data table component and integrate with apps route
ErwanDecoster daac74a
feat: add SearcherBar component and integrate it into apps and index …
ErwanDecoster 048e909
refactor: remove unused Link import from columns.tsx
ErwanDecoster dc15279
feat: implement PaginatedNavigation component in AppsTable for pagina…
ErwanDecoster bfe4041
refactor: enhance pagination logic in PaginatedNavigation component f…
ErwanDecoster aa44344
refactor: adjust pagination logic in generatePaginationItems for impr…
ErwanDecoster a43e07d
fix: border transition looking bad
ErwanDecoster 7026eae
refactor: update useAppsData to accept currentPage for dynamic data f…
ErwanDecoster bc1c2db
fix: add placeholderData to useQuery for improved data handling
ErwanDecoster c4c7665
refactor: wrap app name in a div and fixe is width
ErwanDecoster 54b3344
fix: update TABLE_LENGTH to 16 for correct configuration
ErwanDecoster 334af0a
refactor: remove AppsTable component and integrate its functionality …
ErwanDecoster 633b2e7
feat: add Deals route with data fetching and pagination functionality
ErwanDecoster 6389ebe
fix: rename taskQuery to tasksQuery for consistency in data fetching
ErwanDecoster bc0169d
refactor: reorganize imports and simplify conditional rendering in De…
ErwanDecoster d913a02
feat: implement Tasks route with data fetching, pagination, and task …
ErwanDecoster 64a11f2
refactor: replace inline type definitions with GraphQL query types fo…
ErwanDecoster c88622b
fix: display workerpool description directly in the table instead of …
ErwanDecoster 107359a
feat: add Workerpools route with data fetching, pagination, and table…
ErwanDecoster ebb7b3e
fix: wrap CopyButton in a div to set a fixed width for app name display
ErwanDecoster a0aa94f
fix: improve description display in workerpools table with consistent…
ErwanDecoster 3c61cab
fix: replace CopyButton with conditional rendering for dataset name d…
ErwanDecoster 05b2b85
feat: add Datasets route with data fetching, pagination, and table co…
ErwanDecoster 7026fd1
fix: update PaginationEllipsis styling for better responsiveness
ErwanDecoster f3ef079
fix: update query state variables to indicate refetch and loading
ErwanDecoster 4e9b092
fix: update loading indicator logic to show during loading or refetching
ErwanDecoster 347109d
fix: adjust SearcherBar styling for improved layout and responsiveness
ErwanDecoster 135bc85
fix: refactor SearcherBar layout for improved structure and styling
ErwanDecoster 2a817d8
fix: adjust SearcherBar padding for improved layout consistency
ErwanDecoster c6cc91f
fix: simplify Button component structure in SearcherBar for cleaner code
ErwanDecoster 4d207a2
fix: update PaginationPrevious and PaginationNext to use screen reade…
ErwanDecoster 0cb3ff1
fix: refactor SearcherBar to improve button visibility and input clas…
ErwanDecoster cbbf3be
fix: update placeholder text in SearcherBar for clarity
ErwanDecoster 92f5529
feat: rename folder
ErwanDecoster 1f2f47d
feat: rename folder AppsTable/ to appTable/
ErwanDecoster 258ea4f
fix: remove unnecessary 'use client' directive from multiple components
ErwanDecoster ae3cefc
feat: enhance DataTable component with tableLength and isLoading prop…
ErwanDecoster 5745139
feat: move routes for apps, datasets, deals, tasks, and workerpools
ErwanDecoster 2c784a1
fix: update destination paths for apps, datasets, deals, tasks, and w…
ErwanDecoster 6053b75
feat: implement DataTable component and update routes to use it
ErwanDecoster 2544b75
feat: replace useNavigate with Link in DataTable for improved navigation
ErwanDecoster 69d3a3d
feat: refactor preview tables to use DataTable component for improved…
ErwanDecoster e6f90c9
fix: prevent default button behavior in CopyButton component
ErwanDecoster 13d9030
feat: rename WorkerpoolsPreviewTable component and update import path
ErwanDecoster e81759b
fix: update import path for WorkerpoolsPreviewTable component
ErwanDecoster 3e38af9
feat: add routes for datasets, deals, tasks, and workerpools with dat…
ErwanDecoster 5bfa26e
refactor: remove unused AppsTable component and related code
ErwanDecoster 4c04d5f
feat: add NextApps, NextDatasets, NextDeals, NextTasks, and NextWorke…
ErwanDecoster fa09d87
fix: update import path for WorkerpoolsPreviewTable component
ErwanDecoster aca2247
chore: update @radix-ui/react-slot version to 1.2.2 in package.json a…
ErwanDecoster 960cf5d
feat: update pagination logic in multiple routes to adjust current pa…
ErwanDecoster 9297649
feat: add ChainSelector component and integrate new chain Arbitrum Se…
ErwanDecoster 6d5ccc5
fix: update danger color variables for improved accessibility
ErwanDecoster fbdff62
fix: replace Terminal icon with AlertOctagon in UnsupportedChain comp…
ErwanDecoster 1ab0508
fix: adjust border radius and add left border to destructive alert va…
ErwanDecoster e8a808d
fix: remove Avalanche Fuji from configuration
ErwanDecoster ceef12b
fix: add color property to chain objects and update background color …
ErwanDecoster d956d68
feat: integrate subgraph URL management in user store and update quer…
ErwanDecoster 664128a
fix: add query client initialization and invalidate queries in useSyn…
ErwanDecoster 8fb7be5
Merge branch 'feature/add-main-pages' into feature/chain-switch
ErwanDecoster 463d0f8
fix: update useUserStore import and refactor query execution in Tasks…
ErwanDecoster 4c9dd9c
fix: update query execution in apps, datasets, deals, tasks, and work…
ErwanDecoster b5a3bcd
fix: update query execution in preview tables to include chainId in q…
ErwanDecoster 02c5cc4
Merge branch 'main' into feature/chain-switch
ErwanDecoster 8b939d7
fix: update query execution in WorkerpoolsPreviewTable to include cha…
ErwanDecoster 428267b
fix: temps renaming
ErwanDecoster 7af8875
fix: rename WorkerpoolsPreviewTable
ErwanDecoster 5532f01
fix: correct import path for WorkerpoolsPreviewTable
ErwanDecoster 067cbe9
fix: update ChainSelector to handle chainId as a required number
ErwanDecoster 577a337
fix: update useSyncAccountWithUserStore to set chainId only when curr…
ErwanDecoster 75b437a
fix: refactor to use chainId instead of subgraphUrl in various compon…
ErwanDecoster 6c83ccf
fix: update subgraphUrl for Arbitrum Sepolia in SUPPORTED_CHAINS
ErwanDecoster 9870248
fix: simplify ChainSelector by removing local state and using chainId…
ErwanDecoster cdac27a
feat: implement dynamic routes for chain-specific apps, datasets, tas…
ErwanDecoster ce5577f
feat: add missing deals page, lost during merge
ErwanDecoster 862ac61
fix: import filename casing issue
PierreJeanjacquot 7ea657b
refactor: introduce ChainSyncManager to keep chain state up to date
PierreJeanjacquot c09e2e6
fix: update redirect target to use INITIAL_CHAIN slug
ErwanDecoster 4968a0c
fix: enable data fetching based on chainId
ErwanDecoster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { SUPPORTED_CHAINS } from '@/config.ts'; | ||
| import { switchChain } from '@wagmi/core'; | ||
| import { useEffect, useState } from 'react'; | ||
| import useUserStore from '@/stores/useUser.store.ts'; | ||
| import { wagmiAdapter } from '@/utils/wagmiConfig.ts'; | ||
| import { | ||
| Select, | ||
| SelectContent, | ||
| SelectItem, | ||
| SelectTrigger, | ||
| SelectValue, | ||
| } from '../ui/select.tsx'; | ||
|
|
||
| export function ChainSelector() { | ||
| const { chainId } = useUserStore(); | ||
| const [selectedChainId, setSelectedChainId] = useState<string>( | ||
| chainId.toString(), | ||
| ); | ||
|
|
||
| useEffect(() => { | ||
| if (chainId) { | ||
| setSelectedChainId(chainId.toString()); | ||
| } | ||
| }, [chainId]); | ||
|
|
||
| const handleChainChange = async (value: string) => { | ||
| setSelectedChainId(value); | ||
|
|
||
| switchChain(wagmiAdapter.wagmiConfig, { chainId: Number(value) }); | ||
| }; | ||
|
|
||
| return ( | ||
| <Select value={selectedChainId} onValueChange={handleChainChange}> | ||
| <SelectTrigger> | ||
| <SelectValue placeholder="Select Chain" /> | ||
| </SelectTrigger> | ||
| <SelectContent> | ||
| {SUPPORTED_CHAINS.map((chain) => ( | ||
| <SelectItem key={chain.id} value={chain.id.toString()}> | ||
| <img src={chain.icon} className="size-4" alt="" /> {chain.name} | ||
| </SelectItem> | ||
| ))} | ||
| </SelectContent> | ||
| </Select> | ||
| ); | ||
| } | ||
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.