From 9d5ad504fba10ebadb71b122ba8773059669e72d Mon Sep 17 00:00:00 2001 From: Vladislav Kibenko Date: Tue, 25 Jun 2024 00:12:44 +0300 Subject: [PATCH] chore(code quality): fix typos --- index.html | 6 ------ package.json | 2 +- src/components/App.tsx | 2 +- src/components/Page/Page.css | 8 -------- src/components/Page/Page.tsx | 16 ---------------- src/pages/InitDataPage/InitDataPage.tsx | 4 ++-- src/pages/TONConnectPage/TONConnectPage.tsx | 3 ++- 7 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 src/components/Page/Page.css delete mode 100644 src/components/Page/Page.tsx diff --git a/index.html b/index.html index 98867ff..852b6ed 100644 --- a/index.html +++ b/index.html @@ -5,12 +5,6 @@ Telegram Mini App - - - diff --git a/package.json b/package.json index 872d2d9..a3608af 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint:fix": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix", "preview": "vite preview", - "predeploy": "pnpm run build" + "predeploy": "npm run build" }, "dependencies": { "@telegram-apps/telegram-ui": "^2.1.4", diff --git a/src/components/App.tsx b/src/components/App.tsx index fe8f655..e7b7e86 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -37,7 +37,7 @@ export const App: FC = () => { return viewport && bindViewportCSSVars(viewport); }, [viewport]); - // Create new application navigator and attach it to the browser history, so it could modify + // Create a new application navigator and attach it to the browser history, so it could modify // it and listen to its changes. const navigator = useMemo(() => initNavigator('app-navigation-state'), []); const [location, reactNavigator] = useIntegration(navigator); diff --git a/src/components/Page/Page.css b/src/components/Page/Page.css deleted file mode 100644 index 8c7b788..0000000 --- a/src/components/Page/Page.css +++ /dev/null @@ -1,8 +0,0 @@ -.page { - padding: 0 10px; - box-sizing: border-box; -} - -.page__disclaimer { - margin-bottom: 16px; -} \ No newline at end of file diff --git a/src/components/Page/Page.tsx b/src/components/Page/Page.tsx deleted file mode 100644 index 3007a5a..0000000 --- a/src/components/Page/Page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import type { FC, PropsWithChildren, ReactNode } from 'react'; - -import './Page.css'; - -export interface PageProps extends PropsWithChildren { - title: string; - disclaimer?: ReactNode; -} - -export const Page: FC = ({ title, children, disclaimer }) => ( -
-

{title}

- {disclaimer &&
{disclaimer}
} - {children} -
-); diff --git a/src/pages/InitDataPage/InitDataPage.tsx b/src/pages/InitDataPage/InitDataPage.tsx index 2d985e3..5ba05bb 100644 --- a/src/pages/InitDataPage/InitDataPage.tsx +++ b/src/pages/InitDataPage/InitDataPage.tsx @@ -88,7 +88,7 @@ export const InitDataPage: FC = () => { style={{ display: 'block', width: '144px', height: '144px' }} /> - ) + ); } return ( @@ -97,5 +97,5 @@ export const InitDataPage: FC = () => { {receiverRows && } {chatRows && } - ) + ); }; diff --git a/src/pages/TONConnectPage/TONConnectPage.tsx b/src/pages/TONConnectPage/TONConnectPage.tsx index 22a9848..a0f9e35 100644 --- a/src/pages/TONConnectPage/TONConnectPage.tsx +++ b/src/pages/TONConnectPage/TONConnectPage.tsx @@ -5,7 +5,8 @@ import { Cell, List, Navigation, - Placeholder, Section, + Placeholder, + Section, Text, Title, } from '@telegram-apps/telegram-ui';