This commit is contained in:
Gilbert 2024-04-11 21:59:33 -05:00
parent 6316aa852b
commit baadc507e7
5 changed files with 85 additions and 2024 deletions

View File

@ -21,14 +21,7 @@
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.0.7",
"@snowballtools/auth": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/auth",
"@snowballtools/auth-lit": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/auth-lit",
"@snowballtools/js-sdk": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/js-sdk",
"@snowballtools/link-lit-alchemy-light": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/link-lit-alchemy-light",
"@snowballtools/material-tailwind-react-fork": "^2.1.10",
"@snowballtools/smartwallet-alchemy-light": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/smartwallet-alchemy-light",
"@snowballtools/types": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/types",
"@snowballtools/utils": "/Users/rabbit-m2/p/snowball/snowball-ts-sdk/packages/utils",
"@tanstack/react-query": "^5.22.2",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",

View File

@ -1,17 +1,17 @@
import { useSnowball } from 'utils/use-snowball';
// import { useSnowball } from 'utils/use-snowball';
export const SnowballLogin = () => {
const snowball = useSnowball();
console.log(snowball);
return (
<div className="flex items-center justify-center h-screen bg-snowball-900 snow">
<div className="flex flex-col items-center justify-center">
<img
src="/logo.svg"
alt="snowball logo"
className="w-32 h-32 rounded-full mb-4"
/>
</div>
</div>
);
};
// export const SnowballLogin = () => {
// const snowball = useSnowball();
// console.log(snowball);
// return (
// <div className="flex items-center justify-center h-screen bg-snowball-900 snow">
// <div className="flex flex-col items-center justify-center">
// <img
// src="/logo.svg"
// alt="snowball logo"
// className="w-32 h-32 rounded-full mb-4"
// />
// </div>
// </div>
// );
// };

View File

@ -1,19 +1,19 @@
import { LitGoogleAuth } from '@snowballtools/auth-lit';
import { Snowball, SnowballChain } from '@snowballtools/js-sdk';
// import { LinkLitAlchemyLight } from '@snowballtools/link-lit-alchemy-light';
// import { LitGoogleAuth } from '@snowballtools/auth-lit';
// import { Snowball, SnowballChain } from '@snowballtools/js-sdk';
// // import { LinkLitAlchemyLight } from '@snowballtools/link-lit-alchemy-light';
export const DOMAIN = import.meta.env.VITE_DOMAIN || 'localhost';
export const ORIGIN =
import.meta.env.VITE_VERCEL_ENV === 'production'
? `https://${DOMAIN}`
: `http://${DOMAIN}:3000`;
// export const DOMAIN = import.meta.env.VITE_DOMAIN || 'localhost';
// export const ORIGIN =
// import.meta.env.VITE_VERCEL_ENV === 'production'
// ? `https://${DOMAIN}`
// : `http://${DOMAIN}:3000`;
// prettier-ignore
// // prettier-ignore
export const snowball = Snowball.withAuth(
LitGoogleAuth.configure({
litReplayApiKey: import.meta.env.VITE_LIT_RELAY_API_KEY!,
}),
).create({
initialChain: SnowballChain.sepolia,
});
// export const snowball = Snowball.withAuth(
// LitGoogleAuth.configure({
// litReplayApiKey: import.meta.env.VITE_LIT_RELAY_API_KEY!,
// }),
// ).create({
// initialChain: SnowballChain.sepolia,
// });

View File

@ -1,13 +1,13 @@
import { useEffect, useState } from 'react';
import { snowball } from './snowball';
// import { useEffect, useState } from 'react';
// import { snowball } from './snowball';
export function useSnowball() {
const [state, setState] = useState(100);
// export function useSnowball() {
// const [state, setState] = useState(100);
useEffect(() => {
// Subscribe and directly return the unsubscribe function
return snowball.subscribe(() => setState(state + 1));
}, [snowball]);
// useEffect(() => {
// // Subscribe and directly return the unsubscribe function
// return snowball.subscribe(() => setState(state + 1));
// }, [snowball]);
return snowball;
}
// return snowball;
// }

2016
yarn.lock

File diff suppressed because it is too large Load Diff