diff options
| author | physcik <mynameisgennadiy@vk.com> | 2026-04-10 19:30:54 +0500 |
|---|---|---|
| committer | physcik <mynameisgennadiy@vk.com> | 2026-04-10 19:30:54 +0500 |
| commit | fd5b5fedfec1921930257b1003245f3740536556 (patch) | |
| tree | 29ab224ab0ae249f7e080f7be3d5373482e80a75 | |
| parent | d5df390bc6e4d2860cf0bb36ffe8e0584ed96f5d (diff) | |
Front fix
| -rw-r--r-- | front/.gitignore (renamed from my-app/.gitignore) | 0 | ||||
| -rw-r--r-- | front/README.md | 70 | ||||
| -rw-r--r-- | front/package-lock.json (renamed from my-app/package-lock.json) | 103 | ||||
| -rw-r--r-- | front/package.json (renamed from my-app/package.json) | 8 | ||||
| -rw-r--r-- | front/public/favicon.ico (renamed from my-app/public/favicon.ico) | bin | 3870 -> 3870 bytes | |||
| -rw-r--r-- | front/public/index.html (renamed from my-app/public/index.html) | 0 | ||||
| -rw-r--r-- | front/public/logo192.png (renamed from my-app/public/logo192.png) | bin | 5347 -> 5347 bytes | |||
| -rw-r--r-- | front/public/logo512.png (renamed from my-app/public/logo512.png) | bin | 9664 -> 9664 bytes | |||
| -rw-r--r-- | front/public/manifest.json (renamed from my-app/public/manifest.json) | 0 | ||||
| -rw-r--r-- | front/public/robots.txt (renamed from my-app/public/robots.txt) | 0 | ||||
| -rw-r--r-- | front/src/App.css (renamed from my-app/src/App.css) | 0 | ||||
| -rw-r--r-- | front/src/App.js (renamed from my-app/src/App.tsx) | 3 | ||||
| -rw-r--r-- | front/src/App.test.js | 8 | ||||
| -rw-r--r-- | front/src/index.css (renamed from my-app/src/index.css) | 0 | ||||
| -rw-r--r-- | front/src/index.js (renamed from my-app/src/index.tsx) | 5 | ||||
| -rw-r--r-- | front/src/logo.svg (renamed from my-app/src/logo.svg) | 0 | ||||
| -rw-r--r-- | front/src/reportWebVitals.js (renamed from my-app/src/reportWebVitals.ts) | 4 | ||||
| -rw-r--r-- | front/src/setupTests.js | 5 | ||||
| -rw-r--r-- | my-app/README.md | 46 | ||||
| -rw-r--r-- | my-app/src/react-app-env.d.ts | 1 | ||||
| -rw-r--r-- | my-app/tsconfig.json | 26 | ||||
| -rw-r--r-- | package-lock.json | 6 |
22 files changed, 152 insertions, 133 deletions
diff --git a/my-app/.gitignore b/front/.gitignore index 4d29575..4d29575 100644 --- a/my-app/.gitignore +++ b/front/.gitignore diff --git a/front/README.md b/front/README.md new file mode 100644 index 0000000..58beeac --- /dev/null +++ b/front/README.md @@ -0,0 +1,70 @@ +# Getting Started with Create React App + +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.\ +Open [http://localhost:3000](http://localhost:3000) to view it in your browser. + +The page will reload when you make changes.\ +You may also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.\ +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can't go back!** + +If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. + +You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). + +### Code Splitting + +This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) + +### Analyzing the Bundle Size + +This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) + +### Making a Progressive Web App + +This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) + +### Advanced Configuration + +This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) + +### Deployment + +This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) + +### `npm run build` fails to minify + +This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/my-app/package-lock.json b/front/package-lock.json index 686b987..3ff892a 100644 --- a/my-app/package-lock.json +++ b/front/package-lock.json @@ -1,25 +1,21 @@ { - "name": "my-app", + "name": "front", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "my-app", + "name": "front", "version": "0.1.0", "dependencies": { "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.2", "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.2", - "@types/node": "^16.18.126", - "@types/react": "^19.2.14", - "@types/react-dom": "^19.2.3", "react": "^19.2.5", "react-dom": "^19.2.5", + "react-router": "^7.14.0", "react-scripts": "5.0.1", - "typescript": "^4.9.5", "web-vitals": "^2.1.4" } }, @@ -3644,16 +3640,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "27.5.2", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", - "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", - "license": "MIT", - "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -3673,10 +3659,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "16.18.126", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz", - "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==", - "license": "MIT" + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.19.0" + } }, "node_modules/@types/node-forge": { "version": "1.3.14", @@ -3717,24 +3706,6 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "license": "MIT" }, - "node_modules/@types/react": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", - "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", - "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.2.0" - } - }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -6314,12 +6285,6 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "license": "MIT" }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "license": "MIT" - }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -13798,6 +13763,41 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.14.0.tgz", + "integrity": "sha512-m/xR9N4LQLmAS0ZhkY2nkPA1N7gQ5TUVa5n8TgANuDTARbn1gt+zLPXEm7W0XDTbrQ2AJSJKhoa6yx1D8BcpxQ==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router/node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", @@ -14676,6 +14676,12 @@ "node": ">= 0.8.0" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -16122,6 +16128,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -16154,6 +16161,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "license": "MIT" }, + "node_modules/undici-types": { + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "license": "MIT" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", diff --git a/my-app/package.json b/front/package.json index 54cad60..95b2521 100644 --- a/my-app/package.json +++ b/front/package.json @@ -1,5 +1,5 @@ { - "name": "my-app", + "name": "front", "version": "0.1.0", "private": true, "dependencies": { @@ -7,14 +7,10 @@ "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.2", "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.2", - "@types/node": "^16.18.126", - "@types/react": "^19.2.14", - "@types/react-dom": "^19.2.3", "react": "^19.2.5", "react-dom": "^19.2.5", + "react-router": "^7.14.0", "react-scripts": "5.0.1", - "typescript": "^4.9.5", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/my-app/public/favicon.ico b/front/public/favicon.ico Binary files differindex a11777c..a11777c 100644 --- a/my-app/public/favicon.ico +++ b/front/public/favicon.ico diff --git a/my-app/public/index.html b/front/public/index.html index aa069f2..aa069f2 100644 --- a/my-app/public/index.html +++ b/front/public/index.html diff --git a/my-app/public/logo192.png b/front/public/logo192.png Binary files differindex fc44b0a..fc44b0a 100644 --- a/my-app/public/logo192.png +++ b/front/public/logo192.png diff --git a/my-app/public/logo512.png b/front/public/logo512.png Binary files differindex a4e47a6..a4e47a6 100644 --- a/my-app/public/logo512.png +++ b/front/public/logo512.png diff --git a/my-app/public/manifest.json b/front/public/manifest.json index 080d6c7..080d6c7 100644 --- a/my-app/public/manifest.json +++ b/front/public/manifest.json diff --git a/my-app/public/robots.txt b/front/public/robots.txt index e9e57dc..e9e57dc 100644 --- a/my-app/public/robots.txt +++ b/front/public/robots.txt diff --git a/my-app/src/App.css b/front/src/App.css index 74b5e05..74b5e05 100644 --- a/my-app/src/App.css +++ b/front/src/App.css diff --git a/my-app/src/App.tsx b/front/src/App.js index a53698a..3784575 100644 --- a/my-app/src/App.tsx +++ b/front/src/App.js @@ -1,4 +1,3 @@ -import React from 'react'; import logo from './logo.svg'; import './App.css'; @@ -8,7 +7,7 @@ function App() { <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <p> - Edit <code>src/App.tsx</code> and save to reload. + Edit <code>src/App.js</code> and save to reload. </p> <a className="App-link" diff --git a/front/src/App.test.js b/front/src/App.test.js new file mode 100644 index 0000000..1f03afe --- /dev/null +++ b/front/src/App.test.js @@ -0,0 +1,8 @@ +import { render, screen } from '@testing-library/react'; +import App from './App'; + +test('renders learn react link', () => { + render(<App />); + const linkElement = screen.getByText(/learn react/i); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/my-app/src/index.css b/front/src/index.css index ec2585e..ec2585e 100644 --- a/my-app/src/index.css +++ b/front/src/index.css diff --git a/my-app/src/index.tsx b/front/src/index.js index 2959569..d563c0f 100644 --- a/my-app/src/index.tsx +++ b/front/src/index.js @@ -4,10 +4,7 @@ import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; -const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement -); - +const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> diff --git a/my-app/src/logo.svg b/front/src/logo.svg index 9dfc1c0..9dfc1c0 100644 --- a/my-app/src/logo.svg +++ b/front/src/logo.svg diff --git a/my-app/src/reportWebVitals.ts b/front/src/reportWebVitals.js index 49a2a16..5253d3a 100644 --- a/my-app/src/reportWebVitals.ts +++ b/front/src/reportWebVitals.js @@ -1,6 +1,4 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { +const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); diff --git a/front/src/setupTests.js b/front/src/setupTests.js new file mode 100644 index 0000000..8f2609b --- /dev/null +++ b/front/src/setupTests.js @@ -0,0 +1,5 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom'; diff --git a/my-app/README.md b/my-app/README.md deleted file mode 100644 index b87cb00..0000000 --- a/my-app/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/my-app/src/react-app-env.d.ts b/my-app/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/my-app/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// <reference types="react-scripts" /> diff --git a/my-app/tsconfig.json b/my-app/tsconfig.json deleted file mode 100644 index a273b0c..0000000 --- a/my-app/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx" - }, - "include": [ - "src" - ] -} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..bf34cc6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "cyberpunk_su", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} |
