diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2da3eeb --- /dev/null +++ b/LICENSE @@ -0,0 +1,37 @@ +Copyright (c) Aleksei Bakhirev + +-- EN + +The purpose of this license is to protect the copyrights and limit the use of the Software . + +Terms of the license: +01. The copyright holder grants the user the non-exclusive right to use the Software for personal, non-commercial or educational purposes. +02. The user is not allowed to modify, distribute, sublicense, translate, create derivative works based on the Software without the prior written consent of the Copyright Holder. +03. When using the Software, the user must include the name of the author and a link to the license. +04. If the Software is modified, the user should notify the Copyright Holder and obtain their permission for the changes. +05. This license cannot be transferred to another person or organization without the prior written permission of the Copyright Holder. +06. This license does not grant the user ownership rights to the Software. +07. All rights not granted under this license are reserved by the Copyright Holder. +08. If the user violates the terms of this license, the Copyright Holder has the right to require the termination of use of the protected work, removal of the protected work from any media, as well as compensation for damages. +09. The author assumes no responsibility for any damage, including direct, indirect, incidental, special or other damage, resulting from the use or inability to use the software. +10. The author also does not warrant that the software will run without interruptions, errors or other problems, and reserves the right to modify or update the software at any time without prior notice. +11. Additionally, the author does not warrant the software’s conformity to any specific purpose or requirement, and the use of the software is at the user’s own risk. +12. All these terms and conditions are part of the license agreement that the user accepts when using the software. + +-- RU + +Эта лицензия предназначена для обеспечения защиты авторских прав и ограничения использования защищенного произведения. + +Условия лицензии: +01. Правообладатель предоставляет пользователю неисключительное право на использование защищенного произведения для личных, некоммерческих или образовательных целей. +02. Пользователь не имеет права изменять, распространять, сублицензировать, переводить, создавать производные произведения на основе защищенного произведения без предварительного письменного согласия Правообладателя. +03. При использовании защищенного произведения пользователь обязан указывать имя автора и ссылку на лицензию. +04. В случае внесения изменений в защищенное произведение, пользователь должен уведомить об этом Правообладателя и получить его разрешение на внесение изменений. +05. Эта лицензия не может быть передана другому лицу или организации без предварительного письменного разрешения Правообладателя. +06. Данная лицензия не предоставляет пользователю права собственности на защищенное произведение. +07. Все права, не предоставленные в рамках этой лицензии, сохраняются за Правообладателем. +08. Если пользователь нарушает условия данной лицензии, Правообладатель имеет право потребовать прекращения использования защищенного произведения, удаления защищенного произведения с любых носителей, а также возмещение ущерба. +09. Автор не несет ответственности за любой ущерб, включая прямой, косвенный, случайный, специальный или другой, возникший в результате использования или невозможности использования программного обеспечения. +10. Автор также не гарантирует, что программное обеспечение будет работать без сбоев, ошибок или других проблем, и оставляет за собой право изменять или обновлять программное обеспечение в любое время без предварительного уведомления. +11. Кроме того, автор не гарантирует соответствие программного обеспечения каким-либо конкретным целям или требованиям, и использование программного обеспечения осуществляется пользователем на свой страх и риск. +12. Все эти условия и ограничения являются частью лицензионного соглашения, которое пользователь принимает при использовании программного обеспечения. diff --git a/README.md b/README.md index 686dbf7..b249198 100644 --- a/README.md +++ b/README.md @@ -11,23 +11,23 @@ # [Assayo](https://assayo.online/?ref=github&lang=en) -Visualization and analysis of your git repository data ([demo](https://assayo.online/demo/?ref=github&lang=en&dump=./test.txt)). +📈 Visualization and analysis of your git repository data ([demo](https://assayo.online/demo/?ref=github&lang=en&dump=./test.txt)). -##### Employee can evaluate new workplace +##### 👨‍💻 Employee can evaluate new workplace - work speed; - number of extra hours worked; - areas of competence; - volume of features and bugs; - working style of colleagues; -##### Teamlead can evaluate employees +##### ‍👨‍💼 Team lead can evaluate employees - identify slackers; - estimate the amount of code; - learn the work speed; - notice behavioral anomalies; - see the dynamics of work by week; -##### Founder can evaluate product +##### 👑 Founder can evaluate product - product cost; - cost of features; - development time; @@ -62,14 +62,14 @@ Visualization and analysis of your git repository data ([demo](https://assayo.on - [Contacts](#link-25) -### How to quickly view the number of commits? +### 📊 How to quickly view the number of commits? In the root directory of your project, run: ``` git shortlog -s -n -e ``` -### How to concat authors? +### ‍🎭 How to concat authors? In the root directory of your project, you need to create a `.mailmap` file. Example of the contents of the file: ``` @@ -81,7 +81,7 @@ Alex B Read more about the format of this file you can [here](https://git-scm.com/docs/gitmailmap). -### How to export data from git? +### 💾 How to export data from git? #### For online viewing @@ -99,7 +99,7 @@ This file contains data for show a report. The difference between the online and offline format is the presence of a wrapper for strings. The offline format will be pulled up like a `js` file if you just opened `/build/index.html ` -### How to view the report? +### 📉 How to view the report? #### Online - go to the [website](https://assayo.online/); @@ -115,27 +115,27 @@ The difference between the online and offline format is the presence of a wrappe In this case, it is important that the `log.txt` file is generated by the command for offline viewing. -### How to rebuild the report build? +### 🛠️ How to rebuild the report build? - download this repository - run `npm install` - run `npm run build` - the new build will be in the `/build` folder -### How to view a report on a group of microservices? +### 🗃️ How to view a report on a group of microservices? - generate for each microservice file `log.txt` (`log-1.txt`, `log-2.txt`, `log-3.txt` and etc.) - see “How to view an online report?”. At the last step, drag all the files at once into the browser window. - see “How to see a report offline?”. At the second step, drag all microservice files (`log-1.txt`, `log-2.txt`, `log-3.txt` and etc.) to the report folder (`/build`). -### How to brand the interface? +### 🎨 How to brand the interface? You can create your own interface theme. Options: - **Title**. You can set default document title in the URL parameter ```title```. Example: ```?title=You Company``` - **Visual theme**. To do this, you need to prepare a CSS file with new styles and specify its URL in the ```theme``` parameter. Example: ```?theme=//company.com/some.css```. You can use class names as selectors. Most of them do not change in new versions. - **Language**. You can set language in the URL parameter ```lang```. Example: ```?lang=es``` -### How to sign commits? +### 📝 How to sign commits? Follow the [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). Example: ``` JIRA-1234 feat(profile): Added avatar for user @@ -146,7 +146,7 @@ JIRA-1234 feat(profile): Added avatar for user - what problem were solved `(Added avatar for user)` -### How to add checking for commit message? +### 👮 How to add checking for commit message? #### Use file `commit-msg` @@ -173,7 +173,7 @@ fi 2. Run command `npm install pre-commit` -### How to automate data collection? +### 📚 How to automate data collection? #### With backend @@ -188,7 +188,7 @@ fi Every time you restart the computer, the script will update statistics on all the data that automatically merged into the main branch. -### DevOps (CI/CD) +### 🛠️ DevOps (CI/CD) #### Public server @@ -219,7 +219,7 @@ By default, the image will run at ```http://127.0.0.1:80/```. If it doesn't work - push image to [Docker Hub](https://hub.docker.com/r/bakhirev/assayo); -### Releases are planned approximately once every six months. What’s next: +### 📌 Releases are planned approximately once every six months. What’s next: - more recommendations and achievements; - annual/monthly summaries, report printing; - localization and internationalization; @@ -228,12 +228,12 @@ By default, the image will run at ```http://127.0.0.1:80/```. If it doesn't work - development of the backend, integration with other systems; -### How to add or edit a translation? +### 🈯 How to add or edit a translation? You can add a new translation or correct an existing one in the ```ts/translations/``` folder. [Instruction](https://github.com/firstcontributions/first-contributions) -### Feedback, suggestions, comments +### 📧 Feedback, suggestions, comments - telegramm [@bakhirev](https://t.me/bakhirev) (priority method of communication) - [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru) - website [https://assayo.online/](https://assayo.online/?ref=github&lang=en) diff --git a/package-lock.json b/package-lock.json index 7b4fcfc..435f9cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "dotenv": "^16.4.5", "http-proxy-middleware": "^2.0.6", "i18next": "^23.9.0", "mobx": "^6.7.0", @@ -7019,11 +7020,14 @@ } }, "node_modules/dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, "node_modules/dotenv-expand": { @@ -15137,6 +15141,14 @@ } } }, + "node_modules/react-scripts/node_modules/dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "engines": { + "node": ">=10" + } + }, "node_modules/react-testing-library": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/react-testing-library/-/react-testing-library-8.0.1.tgz", @@ -23412,9 +23424,9 @@ } }, "dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" }, "dotenv-expand": { "version": "5.1.0", @@ -29090,6 +29102,13 @@ "webpack-dev-server": "^4.6.0", "webpack-manifest-plugin": "^4.0.2", "workbox-webpack-plugin": "^6.4.1" + }, + "dependencies": { + "dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" + } } }, "react-testing-library": { diff --git a/package.json b/package.json index 10dfd40..5552c9d 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,12 @@ "xlsx": "^0.18.5" }, "scripts": { + "build-rename": "npm run build-rename-js && npm run build-rename-css", + "build-rename-js": "mv build/static/js/main.*.js build/static/index.js && rm -rf build/static/js", + "build-rename-css": "mv build/static/css/main.*.css build/static/index.css && rm -rf build/static/css", "dev": "set PORT=3006 && react-app-rewired start", - "build": "react-scripts build", + "build": "react-scripts build && npm run build-rename", + "build-local": "set REACT_APP_TYPE=local && react-scripts build && npm run build-rename", "test": "react-scripts test", "eject": "react-scripts eject", "js:check": "npx eslint \"src/**/*.{ts,tsx,js}\"", diff --git a/public/index.html b/public/index.html index 83250b7..c6baaca 100644 --- a/public/index.html +++ b/public/index.html @@ -47,19 +47,19 @@ - + - + - - - + + + - + diff --git a/src/assets/cards/commits.png b/src/assets/cards/commits.png deleted file mode 100644 index 16ffbdf..0000000 Binary files a/src/assets/cards/commits.png and /dev/null differ diff --git a/src/assets/cards/dismissal.png b/src/assets/cards/dismissal.png deleted file mode 100644 index a3840b2..0000000 Binary files a/src/assets/cards/dismissal.png and /dev/null differ diff --git a/src/assets/cards/lazy.png b/src/assets/cards/lazy.png deleted file mode 100644 index 3abb790..0000000 Binary files a/src/assets/cards/lazy.png and /dev/null differ diff --git a/src/assets/cards/lines.png b/src/assets/cards/lines.png deleted file mode 100644 index be7a40e..0000000 Binary files a/src/assets/cards/lines.png and /dev/null differ diff --git a/src/assets/cards/money_holidays.png b/src/assets/cards/money_holidays.png deleted file mode 100644 index 8f7c9a7..0000000 Binary files a/src/assets/cards/money_holidays.png and /dev/null differ diff --git a/src/assets/cards/money_lazy.png b/src/assets/cards/money_lazy.png deleted file mode 100644 index 2be5ed4..0000000 Binary files a/src/assets/cards/money_lazy.png and /dev/null differ diff --git a/src/assets/cards/money_month.png b/src/assets/cards/money_month.png deleted file mode 100644 index c8a0455..0000000 Binary files a/src/assets/cards/money_month.png and /dev/null differ diff --git a/src/assets/cards/money_task.png b/src/assets/cards/money_task.png deleted file mode 100644 index 0e97c05..0000000 Binary files a/src/assets/cards/money_task.png and /dev/null differ diff --git a/src/assets/cards/money_total.png b/src/assets/cards/money_total.png deleted file mode 100644 index 3193ebf..0000000 Binary files a/src/assets/cards/money_total.png and /dev/null differ diff --git a/src/assets/cards/money_work.png b/src/assets/cards/money_work.png deleted file mode 100644 index ba56635..0000000 Binary files a/src/assets/cards/money_work.png and /dev/null differ diff --git a/src/assets/cards/month.png b/src/assets/cards/month.png deleted file mode 100644 index 9ef8d49..0000000 Binary files a/src/assets/cards/month.png and /dev/null differ diff --git a/src/assets/cards/nothing_found.png b/src/assets/cards/nothing_found.png deleted file mode 100644 index b9d9d0d..0000000 Binary files a/src/assets/cards/nothing_found.png and /dev/null differ diff --git a/src/assets/cards/print.png b/src/assets/cards/print.png deleted file mode 100644 index c32178e..0000000 Binary files a/src/assets/cards/print.png and /dev/null differ diff --git a/src/assets/cards/tasks.png b/src/assets/cards/tasks.png deleted file mode 100644 index e72107b..0000000 Binary files a/src/assets/cards/tasks.png and /dev/null differ diff --git a/src/assets/cards/tasks_month.png b/src/assets/cards/tasks_month.png deleted file mode 100644 index e73de4f..0000000 Binary files a/src/assets/cards/tasks_month.png and /dev/null differ diff --git a/src/assets/cards/work_days.png b/src/assets/cards/work_days.png deleted file mode 100644 index a972d72..0000000 Binary files a/src/assets/cards/work_days.png and /dev/null differ diff --git a/src/assets/chart/clock.svg b/src/assets/chart/clock.svg deleted file mode 100644 index d86c7ab..0000000 --- a/src/assets/chart/clock.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/assets/chart/commit.svg b/src/assets/chart/commit.svg deleted file mode 100644 index 04a070e..0000000 --- a/src/assets/chart/commit.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/assets/chart/sort.svg b/src/assets/chart/sort.svg deleted file mode 100644 index 38d2d82..0000000 --- a/src/assets/chart/sort.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/close.svg b/src/assets/close.svg deleted file mode 100644 index 1eaf0fd..0000000 --- a/src/assets/close.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/src/assets/dropzone.svg b/src/assets/dropzone.svg deleted file mode 100644 index 53dfa5a..0000000 --- a/src/assets/dropzone.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/assets/favicon.svg b/src/assets/favicon.svg deleted file mode 100644 index 7350596..0000000 --- a/src/assets/favicon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/list/arrow.svg b/src/assets/list/arrow.svg deleted file mode 100644 index 45c385d..0000000 --- a/src/assets/list/arrow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/list/remove.svg b/src/assets/list/remove.svg deleted file mode 100644 index 4286394..0000000 --- a/src/assets/list/remove.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/logo.svg b/src/assets/logo.svg deleted file mode 100644 index 973efcc..0000000 --- a/src/assets/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/arrow_left.svg b/src/assets/menu/arrow_left.svg deleted file mode 100644 index aa76378..0000000 --- a/src/assets/menu/arrow_left.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/menu/arrow_right.svg b/src/assets/menu/arrow_right.svg deleted file mode 100644 index f597d99..0000000 --- a/src/assets/menu/arrow_right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/menu/branch.svg b/src/assets/menu/branch.svg deleted file mode 100644 index 6492450..0000000 --- a/src/assets/menu/branch.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/menu/logout.svg b/src/assets/menu/logout.svg deleted file mode 100644 index dbf6bf8..0000000 --- a/src/assets/menu/logout.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/per_money.svg b/src/assets/menu/per_money.svg deleted file mode 100644 index 473a83e..0000000 --- a/src/assets/menu/per_money.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/per_speed.svg b/src/assets/menu/per_speed.svg deleted file mode 100644 index 73db735..0000000 --- a/src/assets/menu/per_speed.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/print.svg b/src/assets/menu/print.svg deleted file mode 100644 index 3446282..0000000 --- a/src/assets/menu/print.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/pull-request.svg b/src/assets/menu/pull-request.svg deleted file mode 100644 index 0d9d27f..0000000 --- a/src/assets/menu/pull-request.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/menu/pull_request.svg b/src/assets/menu/pull_request.svg deleted file mode 100644 index dc49aeb..0000000 --- a/src/assets/menu/pull_request.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/assets/menu/setting.svg b/src/assets/menu/setting.svg deleted file mode 100644 index a4f2ba1..0000000 --- a/src/assets/menu/setting.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/share.svg b/src/assets/menu/share.svg deleted file mode 100644 index 3680347..0000000 --- a/src/assets/menu/share.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_common.svg b/src/assets/menu/team_common.svg deleted file mode 100644 index 53a123b..0000000 --- a/src/assets/menu/team_common.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_date_1.svg b/src/assets/menu/team_date_1.svg deleted file mode 100644 index 0d8039e..0000000 --- a/src/assets/menu/team_date_1.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_date_2.svg b/src/assets/menu/team_date_2.svg deleted file mode 100644 index 658821b..0000000 --- a/src/assets/menu/team_date_2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_feat.svg b/src/assets/menu/team_feat.svg deleted file mode 100644 index d816278..0000000 --- a/src/assets/menu/team_feat.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_files.svg b/src/assets/menu/team_files.svg deleted file mode 100644 index a2e2d7a..0000000 --- a/src/assets/menu/team_files.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_type.svg b/src/assets/menu/team_type.svg deleted file mode 100644 index ab22da8..0000000 --- a/src/assets/menu/team_type.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_week.svg b/src/assets/menu/team_week.svg deleted file mode 100644 index a81a3f5..0000000 --- a/src/assets/menu/team_week.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_words.svg b/src/assets/menu/team_words.svg deleted file mode 100644 index b7b8ade..0000000 --- a/src/assets/menu/team_words.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_work.svg b/src/assets/menu/team_work.svg deleted file mode 100644 index 33d0f39..0000000 --- a/src/assets/menu/team_work.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/menu/team_work_2.svg b/src/assets/menu/team_work_2.svg deleted file mode 100644 index 0b18da4..0000000 --- a/src/assets/menu/team_work_2.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/switch/person.svg b/src/assets/switch/person.svg deleted file mode 100644 index 0f5abfa..0000000 --- a/src/assets/switch/person.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/switch/team.svg b/src/assets/switch/team.svg deleted file mode 100644 index 33d0f39..0000000 --- a/src/assets/switch/team.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/ts/components/YearChart/index.tsx b/src/ts/components/YearChart/index.tsx index dd98fd6..4852ef8 100644 --- a/src/ts/components/YearChart/index.tsx +++ b/src/ts/components/YearChart/index.tsx @@ -35,8 +35,6 @@ function YearChart({ }: IYearChartProps): React.ReactElement | null { const wrapper = useRef(null); const [dayWidth, setDayWidth] = useState(16); - const [monthNumber, setMonthNumber] = useState(7); - console.log(monthNumber); useEffect(() => { if (!wrapper.current) return; // @ts-ignore @@ -46,7 +44,6 @@ function YearChart({ const width = getDayWidth(size.width, newMonthNumber); setDayWidth(width); - setMonthNumber(newMonthNumber); }, []); if (!wordDays || !wordDays.length) return null; diff --git a/src/ts/pages/Debug/index.tsx b/src/ts/pages/Debug/index.tsx index 69457e9..e57e574 100644 --- a/src/ts/pages/Debug/index.tsx +++ b/src/ts/pages/Debug/index.tsx @@ -1,7 +1,8 @@ import React from 'react'; import localization from 'ts/helpers/Localization'; -import Description from 'ts/components/Description'; +import CardForPrint from 'ts/components/Recommendations/components/CardForPrint'; + function getFlatRecommendations(translations: any, list: any[] = []) { if (!translations) return list; @@ -22,22 +23,20 @@ function getFlatRecommendations(translations: any, list: any[] = []) { function DebugPage() { const translations = localization.translations[localization.language]; const recommendations = getFlatRecommendations(translations.recommendations) - .map((item: any) => ( -
- -
+ .map((recommendation: any) => ( + )); console.dir(recommendations); return ( -
- {recommendations} -
+ <> +
+ {recommendations} +
+ ); } diff --git a/src/ts/pages/Welcome/index.tsx b/src/ts/pages/Welcome/index.tsx index b5df0c8..583aa2b 100644 --- a/src/ts/pages/Welcome/index.tsx +++ b/src/ts/pages/Welcome/index.tsx @@ -27,11 +27,10 @@ function WarningInfo() { } function Welcome() { - const canShowWarning = true; const command = 'git --no-pager log --numstat --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%cN>%cE>%s" > log.txt\n'; return ( <> - {canShowWarning && ()} + {process.env.REACT_APP_TYPE !== 'local' && ()}