mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: wg login declaration
This commit is contained in:
1 parent
513105a624
commit
bba8118dd7
2 files changed
+7
-6
No files matched your search
+1
-1
@@ -24,7 +24,7 @@
|
|||||||
"start:website": "bun --filter=@blitzkit/website run start",
|
"start:website": "bun --filter=@blitzkit/website run start",
|
||||||
"host:docs": "vitepress preview docs",
|
"host:docs": "vitepress preview docs",
|
||||||
"lint": "tsc",
|
"lint": "tsc",
|
||||||
"lint:website": "bun --filter=@blitzkit/website run lint",
|
"lint:website": "cd packages/website && bun run lint",
|
||||||
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
|
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
|
||||||
"update": "yarn upgrade --latest",
|
"update": "yarn upgrade --latest",
|
||||||
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { App } from '../../../stores/app';
|
import { App } from '../../../stores/app';
|
||||||
import { $wargamingLogin } from '../../../stores/wargamingLogin';
|
|
||||||
|
|
||||||
export const AUTH_PROVIDERS = ['wargaming', 'patreon'] as const;
|
export const AUTH_PROVIDERS = ['wargaming', 'patreon'] as const;
|
||||||
|
|
||||||
@@ -41,10 +40,12 @@ export function Authorize({ provider }: AuthorizeProps) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$wargamingLogin.set({
|
mutateApp((draft) => {
|
||||||
expires: `${Number(searchParams.get('expires_at')) * 1000}`,
|
draft.logins.wargaming = {
|
||||||
token: searchParams.get('access_token')!,
|
expires: Number(searchParams.get('expires_at')) * 1000,
|
||||||
id: searchParams.get('account_id')!,
|
token: searchParams.get('access_token')!,
|
||||||
|
id: Number(searchParams.get('account_id'))!,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user