* convert /documents/privacy to .mdx * fix: update h2 styling in MDX components - Changed h2 font weight from bold to semibold for improved visual hierarchy in rendered content. * fix build * feat: implement public offer document and layout - Added a new layout component for the public offer document. - Created the public offer page in MDX format, detailing terms and conditions for service usage. - Removed the old offer page in TSX format. - Updated links for offer and support to a new shared component for better maintainability. - Integrated Tailwind CSS typography plugin for improved text styling. * fix: correct formatting in privacy policy terms section - Adjusted the formatting of terms and definitions in the privacy policy to ensure consistent presentation and clarity. - Removed unnecessary hyphenation in the definition of "Разработчик" and "Политика" for improved readability.
34 lines
882 B
TypeScript
34 lines
882 B
TypeScript
/* eslint-disable sonarjs/function-return-type */
|
|
'use client';
|
|
|
|
import { useBackButton, useClientOnce, useDidMount, useViewport } from '@/hooks/telegram';
|
|
import { init } from '@/utils/telegram/init';
|
|
import { type PropsWithChildren } from 'react';
|
|
|
|
export function TelegramProvider(props: Readonly<PropsWithChildren>) {
|
|
// Unfortunately, Telegram Mini Apps does not allow us to use all features of
|
|
// the Server Side Rendering. That's why we are showing loader on the server
|
|
// side.
|
|
const didMount = useDidMount();
|
|
|
|
if (!didMount) return null;
|
|
|
|
return <RootInner {...props} />;
|
|
}
|
|
|
|
function RootInner({ children }: PropsWithChildren) {
|
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
|
|
const debug = isDevelopment;
|
|
|
|
// Initialize the library.
|
|
useClientOnce(() => {
|
|
init(debug);
|
|
});
|
|
|
|
useViewport();
|
|
useBackButton();
|
|
|
|
return children;
|
|
}
|