generated from Borodutch/frontend-starter
-
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.
- Loading branch information
1 parent
23d7f4d
commit fd97683
Showing
18 changed files
with
2,648 additions
and
70 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_ALCHEMY_KEY=00000000000000000000000000000000 | ||
VITE_WALLETCONNECT_PROJECT_ID=00000000000000000000000000000000 |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import { Suspense } from 'preact/compat' | ||
import UserCount from 'components/UserCount' | ||
import Description from 'components/Description' | ||
import Minting from 'components/Minting' | ||
import Root from 'components/Root' | ||
import WalletProvider from 'components/WalletProvider' | ||
|
||
export default function () { | ||
return ( | ||
<div className="container mx-auto max-w-prose p-10 prose"> | ||
<h1>SealHub | memorabilia token</h1> | ||
<Suspense fallback={<p>Loading...</p>}> | ||
<UserCount /> | ||
</Suspense> | ||
</div> | ||
<WalletProvider> | ||
<Root> | ||
<Description /> | ||
<Minting /> | ||
</Root> | ||
</WalletProvider> | ||
) | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export default function () { | ||
return ( | ||
<> | ||
<h1>SealHub | memorabilia token</h1> | ||
<p> | ||
Welcome to the memorabilia token minting resource! This is an example of | ||
how one can use{' '} | ||
<a href="https://hub.sealc.red" target="_blank"> | ||
SealHub | ||
</a>{' '} | ||
explained in{' '} | ||
<a href="https://blog.bigwhalelabs.com" target="_blank"> | ||
the relevant tutorial | ||
</a> | ||
. You can find the code for this website{' '} | ||
<a | ||
href="https://github.com/BigWhaleLabs/seal-hub-memorabilia-token" | ||
target="_blank" | ||
> | ||
on our GitHub | ||
</a> | ||
. Cheers! | ||
</p> | ||
</> | ||
) | ||
} |
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,32 @@ | ||
import { ConnectButton } from '@rainbow-me/rainbowkit' | ||
import { useAccount } from 'wagmi' | ||
|
||
function ConnectionFlow() { | ||
return ( | ||
<> | ||
<p>First, please connect your wallet!</p> | ||
<ConnectButton | ||
accountStatus="address" | ||
chainStatus="none" | ||
showBalance={false} | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
function MintingFlow() { | ||
const { address } = useAccount() | ||
return ( | ||
<> | ||
<p>Connected address {address}</p> | ||
<p>Next, sign the message!</p> | ||
<button class="btn btn-primary">Sign the message!</button> | ||
</> | ||
) | ||
} | ||
|
||
export default function () { | ||
const { isConnected } = useAccount() | ||
|
||
return isConnected ? <MintingFlow /> : <ConnectionFlow /> | ||
} |
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,7 @@ | ||
import ChildrenProp from 'models/ChildrenProp' | ||
|
||
export default function ({ children }: ChildrenProp) { | ||
return ( | ||
<div className="container mx-auto max-w-prose p-10 prose">{children}</div> | ||
) | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import '@rainbow-me/rainbowkit/styles.css' | ||
|
||
import { | ||
RainbowKitProvider, | ||
getDefaultWallets, | ||
midnightTheme, | ||
} from '@rainbow-me/rainbowkit' | ||
import { WagmiConfig, configureChains, createConfig } from 'wagmi' | ||
import { alchemyProvider } from 'wagmi/providers/alchemy' | ||
import { goerli } from 'wagmi/chains' | ||
import { publicProvider } from 'wagmi/providers/public' | ||
|
||
import ChildrenProp from 'models/ChildrenProp' | ||
import env from 'helpers/env' | ||
|
||
const { chains, publicClient } = configureChains( | ||
[goerli], | ||
[alchemyProvider({ apiKey: env.VITE_ALCHEMY_KEY }), publicProvider()] | ||
) | ||
|
||
const { connectors } = getDefaultWallets({ | ||
appName: 'SealHub | memorabilia token', | ||
projectId: env.VITE_WALLETCONNECT_PROJECT_ID, | ||
chains, | ||
}) | ||
|
||
const wagmiConfig = createConfig({ | ||
autoConnect: true, | ||
connectors, | ||
publicClient, | ||
}) | ||
|
||
export default function ({ children }: ChildrenProp) { | ||
return ( | ||
<WagmiConfig config={wagmiConfig}> | ||
<RainbowKitProvider | ||
coolMode | ||
chains={chains} | ||
theme={midnightTheme({ | ||
...midnightTheme.accentColors.purple, | ||
})} | ||
> | ||
{children} | ||
</RainbowKitProvider> | ||
</WagmiConfig> | ||
) | ||
} |
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,6 @@ | ||
import { cleanEnv, str } from 'envalid' | ||
|
||
export default cleanEnv(import.meta.env, { | ||
VITE_ALCHEMY_KEY: str(), | ||
VITE_WALLETCONNECT_PROJECT_ID: str(), | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Buffer } from 'buffer' | ||
|
||
window.global = window.global ?? window | ||
window.Buffer = window.Buffer ?? Buffer | ||
window.process = window.process ?? { env: {} } // Minimal process polyfill | ||
|
||
export {} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import 'helpers/polyfills' | ||
import 'index.css' | ||
|
||
import { render } from 'preact' | ||
import App from 'App' | ||
|
||
|
This file was deleted.
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
Oops, something went wrong.