Skip to content

Commit 22e6d00

Browse files
committed
initial implementation
1 parent 31ad6a2 commit 22e6d00

40 files changed

+3930
-451
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PUBLIC_WEB3AUTH_CLIENT_ID=''
2+
PUBLIC_WEB3AUTH_NETWORK='sapphire_devnet or sapphire_mainnet'
3+
PUBLIC_INFURA_KEY=''

.preview/config.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ export default () =>
1616
options: [],
1717
},
1818
{
19-
id: 'unique-and-descriptive-name-here',
20-
options: [
21-
{ key: 'slug', value: 'stokens' },
22-
{ key: 'rpc', value: 'https://polygon-rpc.com/' },
23-
{ key: 'maxpage', value: 30 },
24-
],
19+
id: 'devprotocol:clubs:plugin:web3auth',
20+
options: [],
2521
},
2622
],
2723
})

.preview/plugins.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import theme from './theme'
2-
import sTokensViewer from '../src/index'
2+
import thisPlugin from '../src/index'
33

4-
export default [theme, sTokensViewer]
4+
export default [theme, thisPlugin]

.preview/preview.ssr/astro.config.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

.preview/preview.ssr/src/env.d.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

.preview/preview.ssr/src/pages/[...page].astro

Lines changed: 0 additions & 38 deletions
This file was deleted.

.preview/preview.ssr/src/pages/admin/[...page].astro

Lines changed: 0 additions & 52 deletions
This file was deleted.

.preview/preview.ssr/src/pages/api/[...path].ts

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import { defineConfig } from 'astro/config'
22
import clubs from '@devprotocol/clubs-core'
33
import vue from '@astrojs/vue'
4+
import svelte from '@astrojs/svelte'
45
import tailwind from '@astrojs/tailwind'
6+
import { config } from 'dotenv'
7+
import { nodePolyfills } from 'vite-plugin-node-polyfills'
8+
9+
config({ path: './.env' })
510

611
export default defineConfig({
7-
integrations: [clubs(), vue(), tailwind()],
12+
integrations: [clubs(), vue(), svelte(), tailwind()],
13+
vite: {
14+
plugins: [nodePolyfills()],
15+
},
816
})

.preview/preview.static/src/pages/[...page].astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { InferGetStaticPropsType } from 'astro'
33
import {
44
type ClubsFunctionPageFactoryResult,
55
pageFactory,
6+
ClubsSlotName,
67
} from '@devprotocol/clubs-core'
78
import config from '../../../config'
89
import plugins from '../../../plugins'
@@ -21,8 +22,19 @@ type Props = InferGetStaticPropsType<typeof getStaticPaths>
2122
2223
const Content = Astro.props.component
2324
const Layout = Astro.props.layout
25+
26+
const SlotsClubsConnectButton =
27+
Astro.props.clubs.slots.filter(
28+
(slot) => slot.slot === ClubsSlotName.ConnectButton,
29+
) ?? []
2430
---
2531

2632
<Layout {...Astro.props}>
33+
{
34+
SlotsClubsConnectButton.map((Slot) => (
35+
<Slot.component {...Slot.props} slot="clubs:connect-button" />
36+
))
37+
}
38+
2739
<Content {...Astro.props} />
2840
</Layout>

0 commit comments

Comments
 (0)