Skip to content
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 a quick way to authorize my current account #1764

Merged
merged 22 commits into from
Jan 18, 2025
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
99cc053
feat: poc to detect authorized accounts
helciofranco Jan 8, 2025
220c3de
feat: add useCurrentAccount
helciofranco Jan 9, 2025
1827973
feat: add useCurrentTab
helciofranco Jan 9, 2025
f3996ba
feat: add useConnection
helciofranco Jan 9, 2025
fd6af5b
chore: remove unused stuff
helciofranco Jan 9, 2025
6231acd
feat: add QuickAccountConnect
helciofranco Jan 9, 2025
5947ffa
fix: prevent to check url while loading env
helciofranco Jan 10, 2025
b58627a
feat: add quick account connection to the top bar
helciofranco Jan 10, 2025
9d43642
feat: redirect user to the edit connection page
helciofranco Jan 10, 2025
ad8a460
feat: add skeleton to the quick account badge
helciofranco Jan 10, 2025
71ebf0d
docs: add changeset
helciofranco Jan 10, 2025
9974a21
feat: add DappAvatar
helciofranco Jan 10, 2025
7a0b55a
fix: prevent to display a broken favicon
helciofranco Jan 10, 2025
b2419dd
feat: display title or favicon as fallback if no connections were found
helciofranco Jan 10, 2025
2ae82b9
feat: add quick account with toast
helciofranco Jan 14, 2025
caa0e83
test: update test locators
helciofranco Jan 14, 2025
e91c345
refactor: remove unused useeffect flow
helciofranco Jan 14, 2025
3731bf1
Merge branch 'master' into hf/feat/authorized-accounts
helciofranco Jan 14, 2025
3d6eb26
fix: add missing improt
helciofranco Jan 14, 2025
adb9922
Merge branch 'master' into hf/feat/authorized-accounts
LuizAsFight Jan 18, 2025
fc61fdd
chore
LuizAsFight Jan 18, 2025
03685b9
chore
LuizAsFight Jan 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: prevent to display a broken favicon
helciofranco committed Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 7a0b55a96f2f8ad0d942b27900a282dfca830256
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import { Icon } from '@fuel-ui/react';
import { useState } from 'react';

interface DappAvatarProps {
favIconUrl: string | undefined;
title: string | undefined;
}

export const DappAvatar = ({ favIconUrl, title }: DappAvatarProps) => {
if (favIconUrl) {
return <img src={favIconUrl} alt="favicon" />;
const [imageFallback, setImageFallback] = useState(false);

if (favIconUrl && !imageFallback) {
return (
<img
src={favIconUrl}
alt="favicon"
onError={() => {
setImageFallback(true);
}}
/>
);
}

if (title) {