mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-11-17 16:29:19 +00:00
Not yet
This commit is contained in:
parent
6316aa852b
commit
baadc507e7
@ -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",
|
||||
|
@ -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>
|
||||
// );
|
||||
// };
|
||||
|
@ -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,
|
||||
// });
|
||||
|
@ -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;
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user