-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
57 lines (49 loc) · 1.26 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<script setup lang="ts">
import Header from "~/components/layout/Header.vue";
import Footer from "~/components/layout/Footer.vue";
import {init} from '@web3-onboard/vue'
import type {AppMetadata} from "@web3-onboard/common";
import injectedModule from '@web3-onboard/injected-wallets'
import coinbaseWallet from '@web3-onboard/coinbase';
import {hychain, hychainTestnet} from "~/web3/chains";
import type {OnboardAPI} from "@web3-onboard/core";
const injected = injectedModule()
const coinbase = coinbaseWallet()
const web3Onboard = ref(null as OnboardAPI)
const appMetadata: AppMetadata = {
name: 'Project Name',
description: 'Project Description',
}
web3Onboard.value = init({
wallets: [injected, coinbase],
chains: [hychain, hychainTestnet],
appMetadata: appMetadata,
theme: 'dark',
connect: {
autoConnectLastWallet: true,
showSidebar: false,
removeWhereIsMyWalletWarning: true
}
})
// console.log("web3Onboard", web3Onboard)
</script>
<template>
<div class="main-layout">
<Header/>
<main class="content p-1 md:p-3 lg:p-7 h-80">
<NuxtPage/>
<UNotifications/>
</main>
<Footer/>
</div>
</template>
<style scoped>
.main-layout {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.content {
flex: 1;
}
</style>