Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
* dev:
  🐛 Defer script loading in vanilla example
  💫 Reduce vibration intensity
  🐛 Fix `modalWalletConfig` that can be undefined
  🐛 Fix double publish for good
  • Loading branch information
srod committed Feb 14, 2025
2 parents 2421e65 + 64f238b commit 749ce32
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-dolls-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@frak-labs/components": patch
---

🐛 Fix `modalWalletConfig` that can be undefined
2 changes: 1 addition & 1 deletion example/vanilla-js/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
createHtmlPlugin({
inject: {
data: {
injectScript: `<script src="${scriptSrc}"></script>`,
injectScript: `<script defer src="${scriptSrc}"></script>`,
injectCSS: `<link id="frak-button-wallet" rel="stylesheet" href="${cssSrc}" />`,
injectReactScan: DEBUG
? `<script src="//unpkg.com/react-scan/dist/auto.global.js"></script>`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:infra": "sst build --stage dev",
"build:sdk": "dirs=(core legacy react components); for d in ${dirs[@]}; do bun run --cwd sdk/${d} build; done",
"changeset": "changeset",
"changeset:release": "dirs=(core legacy react components); for d in ${dirs[@]}; do bun run --cwd sdk/${d} publish; done",
"changeset:release": "dirs=(core legacy react components); for d in ${dirs[@]}; do bun run --cwd sdk/${d} publish && bun publish --cwd sdk/${d}; done",
"changeset:version": "changeset version && bun install --lockfile-only",
"clean": "rimraf **/.open-next/ **/.next/ .sst/dist/ .sst/artifacts/",
"deploy": "sst deploy --stage dev",
Expand Down
3 changes: 2 additions & 1 deletion sdk/components/src/ButtonWallet/ButtonWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export function ButtonWallet({
*/
useEffect(() => {
// Get position from config metadata
const position = window.FrakSetup.modalWalletConfig?.metadata?.position;
const position =
window.FrakSetup?.modalWalletConfig?.metadata?.position;
// Fallback to right if not defined
buttonRef.current?.parentElement?.classList.add(position ?? "right");
}, []);
Expand Down
2 changes: 1 addition & 1 deletion sdk/components/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function getModalBuilderSteps() {
*/
export function safeVibrate() {
if ("vibrate" in navigator) {
navigator.vibrate(200);
navigator.vibrate(10);
} else {
console.log("Vibration not supported");
}
Expand Down

0 comments on commit 749ce32

Please sign in to comment.