Skip to content

Commit

Permalink
Merge pull request #174 from Telegram-Mini-Apps/feature/stable-launch…
Browse files Browse the repository at this point in the history
…-params

fix(uselaunchparams): fix import
  • Loading branch information
heyqbnk authored Nov 12, 2023
2 parents f3b848f + 8ee40d8 commit b169b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sdk-react/src/lib/launch-params/useLaunchParams.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useMemo } from 'react';
import { retrieveLaunchParams } from '@tma.js/sdk';
import { computeLaunchData } from '@tma.js/launch-params';

import type { LaunchParams } from './types.js';

/**
* The hook which returns launch parameters initially passed to Mini App.
*/
export function useLaunchParams(): LaunchParams {
return useMemo(retrieveLaunchParams, []);
return useMemo(() => computeLaunchData().launchParams, []);
}

0 comments on commit b169b44

Please sign in to comment.