mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 10:24:02 +00:00
fix(miniapp): roll back vite 8 miniapp update
This commit is contained in:
@@ -11,21 +11,21 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@kobalte/core": "0.13.11",
|
||||
"@solidjs/router": "0.16.1",
|
||||
"@tanstack/solid-query": "5.95.2",
|
||||
"@solidjs/router": "0.15.4",
|
||||
"@tanstack/solid-query": "5.90.23",
|
||||
"@twa-dev/sdk": "8.0.2",
|
||||
"class-variance-authority": "0.7.1",
|
||||
"clsx": "2.1.1",
|
||||
"lucide-solid": "1.0.1",
|
||||
"lucide-solid": "0.577.0",
|
||||
"solid-js": "^1.9.9",
|
||||
"zod": "4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
"@tailwindcss/vite": "^4.1.13",
|
||||
"solid-devtools": "^0.34.3",
|
||||
"tailwindcss": "^4.2.2",
|
||||
"typescript": "^6.0.2",
|
||||
"vite": "^8.0.2",
|
||||
"vite-plugin-solid": "^2.11.11"
|
||||
"tailwindcss": "^4.1.13",
|
||||
"typescript": "^5.9.2",
|
||||
"vite": "^7.1.4",
|
||||
"vite-plugin-solid": "^2.11.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,12 @@
|
||||
export interface TelegramWebAppUser {
|
||||
id?: number
|
||||
first_name?: string
|
||||
username?: string
|
||||
language_code?: string
|
||||
}
|
||||
import WebApp from '@twa-dev/sdk'
|
||||
|
||||
export interface TelegramWebApp {
|
||||
initData: string
|
||||
initDataUnsafe?: {
|
||||
user?: TelegramWebAppUser
|
||||
}
|
||||
ready?: () => void
|
||||
expand?: () => void
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
Telegram?: {
|
||||
WebApp?: TelegramWebApp
|
||||
}
|
||||
}
|
||||
}
|
||||
export type TelegramWebApp = typeof WebApp
|
||||
export type TelegramWebAppUser = NonNullable<NonNullable<TelegramWebApp['initDataUnsafe']>['user']>
|
||||
|
||||
export function getTelegramWebApp(): TelegramWebApp | undefined {
|
||||
if (typeof window === 'undefined') {
|
||||
return undefined
|
||||
}
|
||||
|
||||
return window.Telegram?.WebApp
|
||||
return WebApp
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user