Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fbfdbde
Add theme toggler
hernan-clich Jul 23, 2025
3ed777d
Add Inter font
hernan-clich Jul 23, 2025
6f2d16b
Improved toggle styles
hernan-clich Jul 23, 2025
53951b6
Add Button component
hernan-clich Jul 23, 2025
610545b
Extracted ConnectWallet into its own compone
hernan-clich Jul 23, 2025
147c29c
Improved wallet connect cta styles
hernan-clich Jul 23, 2025
e741167
Improved disconnected screen styles
hernan-clich Jul 23, 2025
4de506f
Disconnected looks ok
hernan-clich Jul 23, 2025
074a861
Main screen looks decent
hernan-clich Jul 23, 2025
115db69
Add link urls
hernan-clich Jul 23, 2025
b4e4836
Improved modal styles
hernan-clich Jul 23, 2025
a0661d2
Removed unsupported chain state
hernan-clich Jul 23, 2025
aaa943b
Removed chain from header
hernan-clich Jul 24, 2025
a3c0c09
Add basic Dropdown
hernan-clich Jul 24, 2025
7703f06
Sorted chains alphabetically
hernan-clich Jul 24, 2025
873676d
Improved p
hernan-clich Jul 24, 2025
b7f05c8
Improved cool text area
hernan-clich Jul 24, 2025
c8b081f
Improved btn
hernan-clich Jul 24, 2025
84ce4ca
Added unsupported network state
hernan-clich Jul 24, 2025
9ad6fe5
Improved dropdown
hernan-clich Jul 24, 2025
6b19948
Add approve icon
hernan-clich Jul 25, 2025
5446525
Improved confirmation screen
hernan-clich Jul 25, 2025
e71d5d4
Add loading states to confirm screen
hernan-clich Jul 26, 2025
cd97ce8
Updated header btn
hernan-clich Jul 26, 2025
3ea4a29
Extracted wallet controls into its own component
hernan-clich Jul 26, 2025
e12193f
A bunch of mobile improvements
hernan-clich Jul 28, 2025
e34f022
More improvements
hernan-clich Jul 28, 2025
7760e85
Flip hash links
hernan-clich Jul 28, 2025
fe82ee1
Copy updates
hernan-clich Jul 28, 2025
f46ee8a
Updated sizing of huge dropdown, now it's just big
hernan-clich Jul 28, 2025
a2bead8
Merge branch 'feat/add-hello-frontend-tutorial' into feat/redesign-he…
hernan-clich Jul 28, 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
6 changes: 0 additions & 6 deletions examples/hello/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Handjet:wght@100..900&family=Silkscreen:wght@400;700&display=swap"
rel="stylesheet"
/>
<title>Universal Hello</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/hello/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.83.0",
"@zetachain/toolkit": "16.0.1",
"clsx": "^2.1.1",
"ethers": "^6.13.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
Expand Down
93 changes: 93 additions & 0 deletions examples/hello/frontend/public/fonts/inter/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 3 additions & 2 deletions examples/hello/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { AppContent } from './AppContent';
import { Header } from './components/Header';
import { ThemeProvider } from './context/ThemeProvider';

function App() {
return (
<>
<ThemeProvider>
<Header />
<AppContent />
</>
</ThemeProvider>
);
}

Expand Down
22 changes: 1 addition & 21 deletions examples/hello/frontend/src/AppContent.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
import { useMemo } from 'react';

import { ConnectedContent } from './ConnectedContent';
import { SUPPORTED_CHAINS } from './constants/chains';
import { DisconnectedContent } from './DisconnectedContent';
import { useWallet } from './hooks/useWallet';
import { UnsupportedNetworkContent } from './UnsupportedNetworkContent';

export function AppContent() {
const {
isConnected,
account,
selectedProvider,
isSupportedChain,
decimalChainId,
} = useWallet();
const { account, selectedProvider, decimalChainId } = useWallet();

const supportedChain = SUPPORTED_CHAINS.find(
(chain) => chain.chainId === decimalChainId
);

const shouldDisplayUnsupportedChainWarning = useMemo(() => {
return isConnected && !isSupportedChain && decimalChainId !== null;
}, [isConnected, isSupportedChain, decimalChainId]);

if (!account || !selectedProvider) {
return <DisconnectedContent />;
}

if (shouldDisplayUnsupportedChainWarning || !supportedChain) {
return (
// Type assertion is safe because we know decimalChainId is not null
<UnsupportedNetworkContent decimalChainId={decimalChainId as number} />
);
}

return (
<ConnectedContent
selectedProvider={selectedProvider}
Expand Down
82 changes: 61 additions & 21 deletions examples/hello/frontend/src/ConfirmedContent.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,81 @@
.transaction-hash-container {
.confirmed-content {
align-items: center;
backdrop-filter: blur(12px);
border-radius: 40px;
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: 0.5rem;
gap: 16px;
justify-content: center;
padding: 24px 32px;
width: 100%;
}

.confirmed-content-title {
font-size: 20px;
font-style: normal;
font-weight: 600;
line-height: 130%; /* 31.2px */
text-align: center;
}

.transaction-hash-container > div {
.confirmed-content-links-container {
align-items: center;
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
justify-content: center;

p,
a {
text-align: center;
white-space: nowrap;
}
gap: 16px;
}

.transaction-hash-link {
.confirmed-content-link-chain {
align-items: center;
color: var(--primary-200);
display: flex;
gap: 0.25rem;
gap: 4px;
}

svg {
color: var(--primary-200);
}
.confirmed-content-link {
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 130%; /* 20.8px */
text-align: center;
white-space: nowrap;
}

.transaction-hash-status {
font-size: 1.5rem;
.confirmed-content-link-disabled {
color: #848484;
pointer-events: none;
text-decoration: none;
}

[data-theme='light'] .confirmed-content {
background: #ffffffcc;
border: 1px solid #e5e8ec;
}

[data-theme='dark'] .confirmed-content {
background: #171f29cc;
border: 1px solid #283442;
}

[data-theme='light'] .confirmed-content-link-enabled {
color: #00a87d;
}

[data-theme='dark'] .confirmed-content-link-enabled {
color: #b0ff61;
}

@media (min-width: 768px) {
.transaction-hash-container {
flex-direction: row;
.confirmed-content {
padding: 48px 32px;
width: 568px;
}

.confirmed-content-title {
font-size: 24px;
}

.confirmed-content-link {
font-size: 16px;
}
}
Loading