Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/frontend-main/src/components/tma/TMAInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ onMounted(async () => {
const tmaInfo = computed(() => {
const params = tmaStore.launchParams;
const initData = tmaStore.initData;
const user = initData?.user();
const user = initData?.user;

if (!user) {
return {
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend-main/src/stores/useTMAStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { InitData, RetrieveLaunchParamsError, RetrieveLaunchParamsResult } from '@tma.js/sdk-vue';
import type { InitData, RetrieveLaunchParamsResult } from '@tma.js/sdk-vue';

import {
initData,
Expand All @@ -22,7 +22,7 @@ declare global {
export const useTMAStore = defineStore('tmaStore', () => {
const isInitialized = ref(false);
const launchParams = ref<RetrieveLaunchParamsResult | null>(null);
const initDataRef = ref<InitData<RetrieveLaunchParamsError>>();
const initDataRef = ref<InitData>();
const error = ref<string | null>(null);
const debugLogs = ref<string[]>([]);

Expand All @@ -41,7 +41,7 @@ export const useTMAStore = defineStore('tmaStore', () => {
// Get init data using the signal
const initDataSignal = useSignal(initData.state);
if (initDataSignal.value) {
initDataRef.value = initDataSignal.value as unknown as InitData<RetrieveLaunchParamsError>;
initDataRef.value = initDataSignal.value as unknown as InitData;
}

isInitialized.value = true;
Expand Down
Loading