mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59: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",
|
||||
"host:docs": "vitepress preview docs",
|
||||
"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)\"",
|
||||
"update": "yarn upgrade --latest",
|
||||
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { useEffect } from 'react';
|
||||
import { App } from '../../../stores/app';
|
||||
import { $wargamingLogin } from '../../../stores/wargamingLogin';
|
||||
|
||||
export const AUTH_PROVIDERS = ['wargaming', 'patreon'] as const;
|
||||
|
||||
@@ -41,10 +40,12 @@ export function Authorize({ provider }: AuthorizeProps) {
|
||||
break;
|
||||
}
|
||||
|
||||
$wargamingLogin.set({
|
||||
expires: `${Number(searchParams.get('expires_at')) * 1000}`,
|
||||
token: searchParams.get('access_token')!,
|
||||
id: searchParams.get('account_id')!,
|
||||
mutateApp((draft) => {
|
||||
draft.logins.wargaming = {
|
||||
expires: Number(searchParams.get('expires_at')) * 1000,
|
||||
token: searchParams.get('access_token')!,
|
||||
id: Number(searchParams.get('account_id'))!,
|
||||
};
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user