Shared FPDAO UI components
-
Run
npm install fpdao-ui
-
Add
"./node_modules/fpdao-ui/**/*"
tocontent
intailwind.config.cjs
-
Create AuthStore
import { AuthStore, createAuthStore } from 'fpdao-ui/auth-store';
let authStore = createAuthStore({
whitelist: [], // canister ids...
host: process.env.DFX_NETWORK !== "ic" ? "http://localhost:4943" : "https://icp0.io",
});
- In
App.svelte
check wallet connections
onMount(async () => {
await authStore.checkConnections();
});
import "fpdao-ui/styles/global.css";
import Footer from "fpdao-ui/components/Footer.svelte";
<Footer {authState}></Footer>
<link rel="icon" type="image/svg+xml" href="/node_modules/fpdao-ui/images/fpd-logo.svg" />
await authStore.transfer("<account-id>", <amount-e8s>);