-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
802 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
{ | ||
"name": "@solana-wallets-solid/start-tailwind", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vinxi dev", | ||
"build": "vinxi build", | ||
"start": "vinxi start", | ||
"typecheck": "tsc --noEmit -p tsconfig.typecheck.json", | ||
"deploy": "vinxi build && wrangler pages deploy dist" | ||
}, | ||
"dependencies": { | ||
"@solana-mobile/wallet-adapter-mobile": "^2.1.3", | ||
"@solana-wallets-solid/core": "workspace:*", | ||
"@solana-wallets-solid/hello": "workspace:*", | ||
"@solana/wallet-adapter-base": "^0.9.23", | ||
"@solana/wallet-adapter-phantom": "^0.9.24", | ||
"@solana/wallet-adapter-solflare": "^0.6.28", | ||
"@solana/wallet-adapter-walletconnect": "^0.1.16", | ||
"@solana/wallet-adapter-wallets": "^0.19.32", | ||
"@solana/wallet-standard-util": "^1.1.1", | ||
"@solana/wallet-standard-wallet-adapter-base": "^1.1.2", | ||
"@solidjs/router": "^0.14.1", | ||
"@solidjs/start": "^1.0.6", | ||
"@wallet-standard/app": "0.0.0-20240703212708", | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.38", | ||
"solid-js": "^1.8.18", | ||
"tailwindcss": "^3.4.3", | ||
"vinxi": "^0.4.1" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
"name": "@solana-wallets-solid/start-tailwind", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vinxi dev", | ||
"build": "vinxi build", | ||
"start": "vinxi start", | ||
"typecheck": "tsc --noEmit -p tsconfig.typecheck.json", | ||
"deploy": "vinxi build && wrangler pages deploy dist" | ||
}, | ||
"dependencies": { | ||
"@solana-mobile/wallet-adapter-mobile": "^2.1.3", | ||
"@solana-wallets-solid/core": "workspace:*", | ||
"@solana-wallets-solid/hello": "workspace:*", | ||
"@solana/wallet-adapter-base": "^0.9.23", | ||
"@solana/wallet-adapter-phantom": "^0.9.24", | ||
"@solana/wallet-adapter-solflare": "^0.6.28", | ||
"@solana/wallet-adapter-walletconnect": "^0.1.16", | ||
"@solana/wallet-adapter-wallets": "^0.19.32", | ||
"@solana/wallet-standard-util": "^1.1.1", | ||
"@solana/wallet-standard-wallet-adapter-base": "^1.1.2", | ||
"@solidjs/router": "^0.14.1", | ||
"@solidjs/start": "^1.0.6", | ||
"@wallet-standard/app": "0.0.0-20240703212708", | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.38", | ||
"solid-js": "^1.8.18", | ||
"tailwindcss": "^3.4.3", | ||
"vinxi": "^0.4.1" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"devDependencies": { | ||
"wrangler": "^3.70.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
export function getLocalStorage<T>( | ||
key: string, | ||
defaultValue: T | undefined = undefined, | ||
): T | undefined { | ||
try { | ||
const value = localStorage.getItem(key) | ||
if (value) return JSON.parse(value) as T | ||
} catch (error) { | ||
if (typeof window !== "undefined") { | ||
console.error(error) | ||
} | ||
} | ||
|
||
return defaultValue | ||
} | ||
|
||
export function setLocalStorage<T>(key: string, value: T | undefined = undefined): void { | ||
try { | ||
if (value === undefined) { | ||
localStorage.removeItem(key) | ||
} else { | ||
localStorage.setItem(key, JSON.stringify(value)) | ||
} | ||
} catch (error) { | ||
if (typeof window !== "undefined") { | ||
console.error(error) | ||
} | ||
} | ||
} |
Oops, something went wrong.