-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add new minimal connect button, connect wallet #224
Open
vacekj
wants to merge
2
commits into
main
Choose a base branch
from
212-implement-connect-wallet-design-to-positions-tab
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import { observer } from 'mobx-react-lite'; | ||
import { DurationWindow, durationWindows } from '@/shared/utils/duration.ts'; | ||
import { CandleWithVolume } from '@/shared/api/server/candles/utils'; | ||
import { BlockchainError } from '@/shared/ui/blockchain-error'; | ||
|
||
const ChartLoadingState = () => { | ||
return ( | ||
|
@@ -260,7 +261,13 @@ | |
))} | ||
</div> | ||
|
||
{error && <div className='text-white'>Error loading pair selector: ${String(error)}</div>} | ||
{error && ( | ||
<div className='w-full h-full flex items-center justify-center'> | ||
<div className='w-[450px] h-full flex items-center justify-center'> | ||
<BlockchainError onDetailsClick={() => console.log('Details clicked')} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: in the near future, this should open the dialog, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's the next step for this PR, I wanted a preliminary review regardless. |
||
</div> | ||
</div> | ||
)} | ||
|
||
<div className='grow w-full h-full max-h-full pt-2 pl-4 pb-4 self-center flex items-center'> | ||
{isLoading && <ChartLoadingState />} | ||
|
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,26 @@ | ||
import { Ban } from 'lucide-react'; | ||
import { Button } from '@penumbra-zone/ui/Button'; | ||
import { Density } from '@penumbra-zone/ui/Density'; | ||
import { Text } from '@penumbra-zone/ui/Text'; | ||
|
||
interface BlockchainErrorProps { | ||
message?: string; | ||
onDetailsClick?: () => void; | ||
} | ||
|
||
export function BlockchainError({ | ||
message = 'An error occurred when loading data from the blockchain', | ||
onDetailsClick, | ||
}: BlockchainErrorProps) { | ||
return ( | ||
<Density compact> | ||
<div className='flex flex-row items-center w-full justify-center gap-4 flex-wrap'> | ||
<Ban className='h-8 w-8 text-red-400' /> | ||
<Text small color='text.secondary'> | ||
{message} | ||
</Text> | ||
<Button onClick={onDetailsClick}>Details</Button> | ||
</div> | ||
</Density> | ||
); | ||
} |
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.
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.
suggestion (non-blocking):
Since penumbra-zone/web#1942, it is possible to provide dynamic
variant
prop to Density, to not duplicate the code