-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
759 additions
and
26 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+121 KB
mini-app/.yarn/cache/@babel-runtime-npm-7.23.2-d013d6cf7e-6c4df4839e.zip
Binary file not shown.
Binary file added
BIN
+13.6 KB
mini-app/.yarn/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-a970d595bd.zip
Binary file not shown.
Binary file added
BIN
+8.5 KB
mini-app/.yarn/cache/@nodelib-fs.stat-npm-2.0.5-01f4dd3030-012480b5ca.zip
Binary file not shown.
Binary file added
BIN
+15.2 KB
mini-app/.yarn/cache/@nodelib-fs.walk-npm-1.2.8-b4a89da548-190c643f15.zip
Binary file not shown.
Binary file added
BIN
+19.3 KB
mini-app/.yarn/cache/copy-webpack-plugin-npm-11.0.0-9a07415855-df4f8743f0.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+24.7 KB
mini-app/.yarn/cache/html-parse-stringify-npm-3.0.1-5762cd4b01-334fdebd4b.zip
Binary file not shown.
Binary file added
BIN
+29.7 KB
mini-app/.yarn/cache/i18next-browser-languagedetector-npm-7.1.0-1a79fe5d7c-36981b9a99.zip
Binary file not shown.
Binary file added
BIN
+35.2 KB
mini-app/.yarn/cache/i18next-http-backend-npm-2.2.2-a3b91fce41-b098cf89e6.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+7.01 KB
mini-app/.yarn/cache/normalize.css-npm-8.0.1-6124fb39b6-4698cae88e.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.58 KB
mini-app/.yarn/cache/queue-microtask-npm-1.2.3-fcc98e4e2d-b676f8c040.zip
Binary file not shown.
Binary file added
BIN
+108 KB
mini-app/.yarn/cache/react-i18next-npm-13.3.1-2ad8c538c6-71a9ae4968.zip
Binary file not shown.
Binary file added
BIN
+9.46 KB
mini-app/.yarn/cache/regenerator-runtime-npm-0.14.0-e060897cf7-1c977ad82a.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.54 KB
mini-app/.yarn/cache/run-parallel-npm-1.2.0-3f47ff2034-cb4f97ad25.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.39 KB
mini-app/.yarn/cache/void-elements-npm-3.1.0-4f43780839-0390f81810.zip
Binary file not shown.
Binary file added
BIN
+5.56 KB
mini-app/.yarn/cache/webidl-conversions-npm-3.0.1-60310f6a2b-c92a0a6ab9.zip
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,20 @@ | |
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@twa-dev/sdk": "^6.9.0", | ||
"i18next": "^23.6.0", | ||
"i18next-browser-languagedetector": "^7.1.0", | ||
"i18next-http-backend": "^2.2.2", | ||
"normalize.css": "^8.0.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
"react-dom": "^18.2.0", | ||
"react-i18next": "^13.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "18.18.2", | ||
"@types/react": "^18.2.28", | ||
"@types/react-dom": "^18.2.13", | ||
"@types/webpack": "^5.28.3", | ||
"copy-webpack-plugin": "^11.0.0", | ||
"css-loader": "^6.8.1", | ||
"html-webpack-plugin": "^5.5.3", | ||
"less": "^4.2.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#error { | ||
color: red; | ||
font-size: large; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import "./Error.less"; | ||
|
||
type ErrorProps = { | ||
error: string; | ||
}; | ||
|
||
function Error({ error }: ErrorProps) { | ||
return <div id="error">{error}</div>; | ||
} | ||
|
||
export default Error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@import url(https://fonts.googleapis.com/css2?family=Roboto); | ||
@import '~normalize.css/normalize.css'; | ||
|
||
body { | ||
font-family: "Roboto", sans-serif; | ||
background-color: var(--tg-theme-bg-color); | ||
padding: 80px; | ||
height: var(--tg-viewport-height); | ||
} | ||
|
||
#root { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"errors": { | ||
"outsideOfTelegram": "This app must be executed inside a Telegram client" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import i18next from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
import HttpBackend from "i18next-http-backend"; | ||
import LanguageDetector from "i18next-browser-languagedetector"; | ||
import WebApp from "@twa-dev/sdk"; | ||
|
||
document.documentElement.lang = WebApp.initDataUnsafe.user?.language_code || "en"; | ||
|
||
const httpBackend = new HttpBackend(null, { | ||
loadPath: "/app/i18n/{{lng}}.json", | ||
}); | ||
|
||
const languageDetector = new LanguageDetector(null, { | ||
order: ["htmlTag"], | ||
}); | ||
|
||
i18next.use(httpBackend).use(languageDetector).use(initReactI18next).init({ | ||
fallbackLng: "en", | ||
}); | ||
|
||
export default i18next; |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"errors": { | ||
"outsideOfTelegram": "Это приложение нужно запускать внутри Telegram клиента" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.