mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 19:30:38 +08:00
Enable routing
This commit is contained in:
+6
-2
@@ -1,15 +1,17 @@
|
||||
<script lang="javascript">
|
||||
import { ethers } from 'ethers';
|
||||
import { get } from 'svelte/store';
|
||||
import { Router, Link, Route } from "svelte-routing";
|
||||
import { getConfig } from './config.js';
|
||||
import { session } from './session.js';
|
||||
|
||||
import Vesting from './base/vesting/Vesting.svelte';
|
||||
import Header from './Header.svelte';
|
||||
|
||||
export let url = "";
|
||||
|
||||
let contractAddress = "";
|
||||
let info = null;
|
||||
let app = Vesting;
|
||||
|
||||
function handleKeydown(event) {
|
||||
if (event.key === 'Enter') {
|
||||
@@ -36,6 +38,8 @@
|
||||
<div class="app">
|
||||
<Header/>
|
||||
<div class="wrapper">
|
||||
<svelte:component this={app}/>
|
||||
<Router url="{url}">
|
||||
<Route path="vesting" component={Vesting} />
|
||||
</Router>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<script lang="js">
|
||||
<script lang="javascript">
|
||||
// TODO: Shorten tx hash
|
||||
// TODO: Link to correct network on etherscan
|
||||
import { ethers } from "ethers";
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/** @type {import("snowpack").SnowpackUserConfig } */
|
||||
module.exports = {
|
||||
mount: {
|
||||
/* ... */
|
||||
},
|
||||
plugins: [
|
||||
'@snowpack/plugin-svelte'
|
||||
],
|
||||
routes: [
|
||||
/* Enable an SPA Fallback in development: */
|
||||
// {"match": "routes", "src": ".*", "dest": "/index.html"},
|
||||
],
|
||||
optimize: {
|
||||
/* Example: Bundle your final build: */
|
||||
// "bundle": true,
|
||||
},
|
||||
packageOptions: {
|
||||
polyfillNode: true,
|
||||
},
|
||||
devOptions: {
|
||||
open: "none",
|
||||
output: "dashboard"
|
||||
},
|
||||
buildOptions: {
|
||||
/* ... */
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user