Skip to content

Commit 749ce32

Browse files
committed
Merge branch 'dev'
* dev: 🐛 Defer script loading in vanilla example 💫 Reduce vibration intensity 🐛 Fix `modalWalletConfig` that can be undefined 🐛 Fix double publish for good
2 parents 2421e65 + 64f238b commit 749ce32

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

.changeset/wicked-dolls-fry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@frak-labs/components": patch
3+
---
4+
5+
🐛 Fix `modalWalletConfig` that can be undefined

example/vanilla-js/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default defineConfig({
2323
createHtmlPlugin({
2424
inject: {
2525
data: {
26-
injectScript: `<script src="${scriptSrc}"></script>`,
26+
injectScript: `<script defer src="${scriptSrc}"></script>`,
2727
injectCSS: `<link id="frak-button-wallet" rel="stylesheet" href="${cssSrc}" />`,
2828
injectReactScan: DEBUG
2929
? `<script src="//unpkg.com/react-scan/dist/auto.global.js"></script>`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build:infra": "sst build --stage dev",
1010
"build:sdk": "dirs=(core legacy react components); for d in ${dirs[@]}; do bun run --cwd sdk/${d} build; done",
1111
"changeset": "changeset",
12-
"changeset:release": "dirs=(core legacy react components); for d in ${dirs[@]}; do bun run --cwd sdk/${d} publish; done",
12+
"changeset:release": "dirs=(core legacy react components); for d in ${dirs[@]}; do bun run --cwd sdk/${d} publish && bun publish --cwd sdk/${d}; done",
1313
"changeset:version": "changeset version && bun install --lockfile-only",
1414
"clean": "rimraf **/.open-next/ **/.next/ .sst/dist/ .sst/artifacts/",
1515
"deploy": "sst deploy --stage dev",

sdk/components/src/ButtonWallet/ButtonWallet.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ export function ButtonWallet({
124124
*/
125125
useEffect(() => {
126126
// Get position from config metadata
127-
const position = window.FrakSetup.modalWalletConfig?.metadata?.position;
127+
const position =
128+
window.FrakSetup?.modalWalletConfig?.metadata?.position;
128129
// Fallback to right if not defined
129130
buttonRef.current?.parentElement?.classList.add(position ?? "right");
130131
}, []);

sdk/components/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function getModalBuilderSteps() {
7171
*/
7272
export function safeVibrate() {
7373
if ("vibrate" in navigator) {
74-
navigator.vibrate(200);
74+
navigator.vibrate(10);
7575
} else {
7676
console.log("Vibration not supported");
7777
}

0 commit comments

Comments
 (0)