From bf97a34db4a95590e5340ec489bd2299272d72db Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Fri, 31 May 2024 10:13:16 -0400 Subject: [PATCH 1/8] Prep to move app.tsx component to files.tsx --- package-lock.json | 522 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 + src/App.test.tsx | 8 +- src/App.tsx | 69 +++--- src/index.tsx | 9 +- 5 files changed, 569 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3253ef..37b41e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,11 +8,15 @@ "name": "section-view", "version": "0.1.0", "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.5", "@fortawesome/fontawesome-svg-core": "^6.5.2", "@fortawesome/free-brands-svg-icons": "^6.5.2", "@fortawesome/free-regular-svg-icons": "^6.5.2", "@fortawesome/free-solid-svg-icons": "^6.5.2", "@fortawesome/react-fontawesome": "^0.2.0", + "@mui/icons-material": "^5.15.19", + "@mui/material": "^5.15.19", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -2309,6 +2313,163 @@ "postcss-selector-parser": "^6.0.10" } }, + "node_modules/@emotion/babel-plugin": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", + "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/serialize": "^1.1.2", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/@emotion/babel-plugin/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dependencies": { + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", + "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + }, + "node_modules/@emotion/react": { + "version": "11.11.4", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", + "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/cache": "^11.11.0", + "@emotion/serialize": "^1.1.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.4.tgz", + "integrity": "sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==", + "dependencies": { + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/unitless": "^0.8.1", + "@emotion/utils": "^1.2.1", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", + "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + }, + "node_modules/@emotion/styled": { + "version": "11.11.5", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.5.tgz", + "integrity": "sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/is-prop-valid": "^1.2.2", + "@emotion/serialize": "^1.1.4", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", + "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", + "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", + "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2402,6 +2563,40 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@floating-ui/core": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.2.tgz", + "integrity": "sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==", + "dependencies": { + "@floating-ui/utils": "^0.2.0" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.5.tgz", + "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==", + "dependencies": { + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.0.tgz", + "integrity": "sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==", + "dependencies": { + "@floating-ui/dom": "^1.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", + "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" + }, "node_modules/@fortawesome/fontawesome-common-types": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.5.2.tgz", @@ -3310,6 +3505,261 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" }, + "node_modules/@mui/base": { + "version": "5.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", + "integrity": "sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@floating-ui/react-dom": "^2.0.8", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "@popperjs/core": "^2.11.8", + "clsx": "^2.1.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.15.19", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.19.tgz", + "integrity": "sha512-tCHSi/Tomez9ERynFhZRvFO6n9ATyrPs+2N80DMDzp6xDVirbBjEwhPcE+x7Lj+nwYw0SqFkOxyvMP0irnm55w==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/icons-material": { + "version": "5.15.19", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.19.tgz", + "integrity": "sha512-RsEiRxA5azN9b8gI7JRqekkgvxQUlitoBOtZglflb8cUDyP12/cP4gRwhb44Ea1/zwwGGjAj66ZJpGHhKfibNA==", + "dependencies": { + "@babel/runtime": "^7.23.9" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@mui/material": "^5.0.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "5.15.19", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.19.tgz", + "integrity": "sha512-lp5xQBbcRuxNtjpWU0BWZgIrv2XLUz4RJ0RqFXBdESIsKoGCQZ6P3wwU5ZPuj5TjssNiKv9AlM+vHopRxZhvVQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/base": "5.0.0-beta.40", + "@mui/core-downloads-tracker": "^5.15.19", + "@mui/system": "^5.15.15", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^18.2.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, + "node_modules/@mui/private-theming": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.14", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", + "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", + "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.14", + "@mui/styled-engine": "^5.15.14", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.14", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", + "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", + "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@types/prop-types": "^15.7.11", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -3428,6 +3878,15 @@ } } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -4316,6 +4775,14 @@ "@types/react": "*" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -5988,6 +6455,14 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -6979,6 +7454,15 @@ "utila": "~0.4" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -8373,6 +8857,11 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -9037,6 +9526,19 @@ "he": "bin/he" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -15020,6 +15522,21 @@ } } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -16359,6 +16876,11 @@ "postcss": "^8.2.15" } }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + }, "node_modules/sucrase": { "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", diff --git a/package.json b/package.json index b6d5992..b67fc72 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,15 @@ "version": "0.1.0", "private": true, "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.5", "@fortawesome/fontawesome-svg-core": "^6.5.2", "@fortawesome/free-brands-svg-icons": "^6.5.2", "@fortawesome/free-regular-svg-icons": "^6.5.2", "@fortawesome/free-solid-svg-icons": "^6.5.2", "@fortawesome/react-fontawesome": "^0.2.0", + "@mui/icons-material": "^5.15.19", + "@mui/material": "^5.15.19", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/App.test.tsx b/src/App.test.tsx index af186ec..bcf071a 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -5,10 +5,10 @@ import App from './App'; test('renders learn react link', () => { render( ); const linkElement = screen.getByText(/learn react/i); diff --git a/src/App.tsx b/src/App.tsx index e33fe37..756ec4c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,38 +1,37 @@ -import './App.css'; -import './css_reset.css' -import './section_view.css'; -import * as types from './types'; -import { Files } from './Files'; -import { ChordProgression } from './ChordProgression'; -import { Comments } from './Comments'; -import { CreateComment } from './CreateComment'; -import { SectionTitle } from './SectionTitle'; -import { useState } from 'react'; - - - - -type AppProps = { - sectionData: types.SectionData, - chordProgression: types.ChordProgression, - files: types.File[], - comments: types.Comment[] -} - -const App:React.FC = ({sectionData, chordProgression, comments, files}) => { - - const [commentsAsState, setCommentsAsState] = useState(comments) - - +import React from 'react'; +import { Box, Grid, Paper } from '@mui/material'; +import { styled } from '@mui/material/styles'; + +const Item = styled(Paper)(({ theme }) => ({ + padding: theme.spacing(2), + textAlign: 'center', + color: theme.palette.text.secondary, + height: '100%', // Adjust the height to take full available height + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + boxSizing: 'border-box', +})); + +const GridContainer = styled(Box)(({ theme }) => ({ + display: 'flex', + flexDirection: 'row', // Ensure flex direction is row + overflowX: 'auto', // Enable horizontal scrolling + height: '100%', // Make sure it takes full available height +})); + +export default function BasicGrid() { return ( -
- - - - - -
+ {/* Set the height to 80% of the viewport height */} + + + {[...Array(12)].map((_, index) => ( + {/* Adjust minWidth to control item width */} + xs=2.4 + + ))} + + + ); } - -export default App; diff --git a/src/index.tsx b/src/index.tsx index 14bf9ac..4a12942 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,10 +11,11 @@ const root = ReactDOM.createRoot( root.render( ); From 18b2debe3deb5405cd907fb53e32a99c0430e429 Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Fri, 31 May 2024 10:36:51 -0400 Subject: [PATCH 2/8] Refactor Files.tsx to use MUI --- src/App.test.tsx | 8 +++--- src/App.tsx | 69 ++++++++++++++++++++++++------------------------ src/Files.tsx | 50 ++++++++++++++++++++++++++--------- src/index.tsx | 8 +++--- 4 files changed, 81 insertions(+), 54 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index bcf071a..af186ec 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -5,10 +5,10 @@ import App from './App'; test('renders learn react link', () => { render( ); const linkElement = screen.getByText(/learn react/i); diff --git a/src/App.tsx b/src/App.tsx index 756ec4c..e33fe37 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,37 +1,38 @@ -import React from 'react'; -import { Box, Grid, Paper } from '@mui/material'; -import { styled } from '@mui/material/styles'; - -const Item = styled(Paper)(({ theme }) => ({ - padding: theme.spacing(2), - textAlign: 'center', - color: theme.palette.text.secondary, - height: '100%', // Adjust the height to take full available height - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - boxSizing: 'border-box', -})); - -const GridContainer = styled(Box)(({ theme }) => ({ - display: 'flex', - flexDirection: 'row', // Ensure flex direction is row - overflowX: 'auto', // Enable horizontal scrolling - height: '100%', // Make sure it takes full available height -})); - -export default function BasicGrid() { +import './App.css'; +import './css_reset.css' +import './section_view.css'; +import * as types from './types'; +import { Files } from './Files'; +import { ChordProgression } from './ChordProgression'; +import { Comments } from './Comments'; +import { CreateComment } from './CreateComment'; +import { SectionTitle } from './SectionTitle'; +import { useState } from 'react'; + + + + +type AppProps = { + sectionData: types.SectionData, + chordProgression: types.ChordProgression, + files: types.File[], + comments: types.Comment[] +} + +const App:React.FC = ({sectionData, chordProgression, comments, files}) => { + + const [commentsAsState, setCommentsAsState] = useState(comments) + + return ( - {/* Set the height to 80% of the viewport height */} - - - {[...Array(12)].map((_, index) => ( - {/* Adjust minWidth to control item width */} - xs=2.4 - - ))} - - - +
+ + + + + +
); } + +export default App; diff --git a/src/Files.tsx b/src/Files.tsx index d9673d5..5bf36ac 100644 --- a/src/Files.tsx +++ b/src/Files.tsx @@ -1,20 +1,46 @@ -import * as types from './types'; +import React from 'react'; +import { Box, Grid, Paper } from '@mui/material'; +import { styled } from '@mui/material/styles'; +import * as types from './types'; // Ensure you have the correct path type FilesProps = { files: types.File[] } +const Item = styled(Paper)(({ theme }) => ({ + padding: theme.spacing(2), + textAlign: 'center', + color: theme.palette.text.secondary, + height: '100%', // Adjust the height to take full available height + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + boxSizing: 'border-box', +})); + +const GridContainer = styled(Box)(({ theme }) => ({ + display: 'flex', + flexDirection: 'row', // Ensure flex direction is row + overflowX: 'auto', // Enable horizontal scrolling + height: '100%', // Make sure it takes full available height +})); + export const Files: React.FC = ({ files }) => { return ( -
- + Files - {files.map((file) => ( -
- {file.title} -



- {file.numComments + ' '} - Comments -
))} -
+ {/* Set the height to 35% of the viewport height */} + + + {files.map((file) => ( + {/* Adjust minWidth to control item width */} + + {file.title} +



+ {file.numComments} Comments +
+
+ ))} +
+
+
); -}; +} diff --git a/src/index.tsx b/src/index.tsx index 4a12942..64a60df 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -12,10 +12,10 @@ root.render( ); From 8f578ee6c4bd92b706fa5235de44519c265b2048 Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Fri, 31 May 2024 10:46:18 -0400 Subject: [PATCH 3/8] Refactor to separate CSS from HTML --- src/Files.tsx | 33 ++++------------ src/section_view.css | 93 ++++++++++++++++---------------------------- 2 files changed, 41 insertions(+), 85 deletions(-) diff --git a/src/Files.tsx b/src/Files.tsx index 5bf36ac..ebd8d09 100644 --- a/src/Files.tsx +++ b/src/Files.tsx @@ -1,46 +1,27 @@ import React from 'react'; import { Box, Grid, Paper } from '@mui/material'; -import { styled } from '@mui/material/styles'; import * as types from './types'; // Ensure you have the correct path type FilesProps = { files: types.File[] } -const Item = styled(Paper)(({ theme }) => ({ - padding: theme.spacing(2), - textAlign: 'center', - color: theme.palette.text.secondary, - height: '100%', // Adjust the height to take full available height - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - boxSizing: 'border-box', -})); - -const GridContainer = styled(Box)(({ theme }) => ({ - display: 'flex', - flexDirection: 'row', // Ensure flex direction is row - overflowX: 'auto', // Enable horizontal scrolling - height: '100%', // Make sure it takes full available height -})); - export const Files: React.FC = ({ files }) => { return ( - {/* Set the height to 35% of the viewport height */} - - + + + {files.map((file) => ( - {/* Adjust minWidth to control item width */} - + + {file.title}



{file.numComments} Comments -
+
))}
-
+
); } diff --git a/src/section_view.css b/src/section_view.css index 7b8a5c8..03c4e43 100644 --- a/src/section_view.css +++ b/src/section_view.css @@ -1,11 +1,11 @@ - - +/* Reset and Global Styles */ * { box-sizing: border-box; } -html {font-size: 62.5%;} - +html { + font-size: 62.5%; +} .root { display: flex; @@ -15,23 +15,12 @@ html {font-size: 62.5%;} min-height: 100vh; } - - div { border: 1px solid black; border-collapse: collapse; - } - - - - - - -/* SECTION TITLE STYLES */ - - +/* Section Title Styles */ .section-title { flex-grow: 1; display: flex; @@ -46,8 +35,8 @@ div { } .section-title .revisions { -flex-grow: 1; -display: flex; + flex-grow: 1; + display: flex; justify-content: center; align-items: center; } @@ -60,10 +49,7 @@ display: flex; flex-direction: column; } - -/* CHORD PROGRESSION STYLES */ - - +/* Chord Progression Styles */ .chords { flex-grow: 2; display: flex; @@ -72,48 +58,46 @@ display: flex; flex-direction: row; } -.chords ol li{ +.chords ol li { font-size: 7rem; display: inline; margin: 3rem; } +/* Files Styles */ +.files-container { + flex-grow: 1; + height: 35vh; /* Set the height to 35% of the viewport height */ +} - -/* FILES STYLES */ - - -.files { - flex-grow: 3; +.grid-container { display: flex; - justify-content: space-around; - align-items: center; - flex-direction: row; + flex-direction: row; /* Ensure flex direction is row */ + overflow-x: auto; /* Enable horizontal scrolling */ + height: 100%; /* Make sure it takes full available height */ } - -.files div { - display: inline; - margin: 3rem; - padding: 3rem; - border: 0.3rem solid rgb(0, 0, 0); - font-size: 3.5rem; +.files-grid { + height: 100%; /* Ensure the grid takes full available height */ + flex-wrap: nowrap; /* Ensure flex direction is row and no wrapping */ } - - -.files span { - font-size: 3rem; +.file-item { + min-width: 19%; /* Adjust minWidth to control item width */ } -.files span::first-letter { - font-size: 5rem; +.item { + padding: 2rem; /* Adjust theme.spacing(2) equivalent to 2rem */ + text-align: center; + color: rgb(117, 117, 117); /* Adjust to theme.palette.text.secondary */ + height: 100%; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; } - -/* STLYES FOR COMMENTS */ - - +/* Comments Styles */ .comments { flex-grow: 3; display: flex; @@ -123,7 +107,6 @@ display: flex; font-size: 2.5rem; } - .comments span { font-size: 7rem; padding: 4rem; @@ -141,15 +124,7 @@ display: flex; margin-left: 5rem; } - - - - - -/* STYLES FOR SUBMITTING A COMMENT */ - - - +/* Submit Comment Styles */ .submit { flex-grow: 2; display: flex; From d14abc066f38ec92eab9dd9f00878c0fc2426461 Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Fri, 31 May 2024 10:52:29 -0400 Subject: [PATCH 4/8] Refactor to avoid future class name collisions --- src/Files.tsx | 6 +++--- src/section_view.css | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Files.tsx b/src/Files.tsx index ebd8d09..d00bb13 100644 --- a/src/Files.tsx +++ b/src/Files.tsx @@ -9,11 +9,11 @@ type FilesProps = { export const Files: React.FC = ({ files }) => { return ( - + {files.map((file) => ( - - + + {file.title}



{file.numComments} Comments diff --git a/src/section_view.css b/src/section_view.css index 03c4e43..ef717c2 100644 --- a/src/section_view.css +++ b/src/section_view.css @@ -16,7 +16,8 @@ html { } div { - border: 1px solid black; + border: 1px solid black; + /* toggle for clarity */ border-collapse: collapse; } @@ -70,7 +71,7 @@ div { height: 35vh; /* Set the height to 35% of the viewport height */ } -.grid-container { +.files-grid-container { display: flex; flex-direction: row; /* Ensure flex direction is row */ overflow-x: auto; /* Enable horizontal scrolling */ @@ -82,11 +83,11 @@ div { flex-wrap: nowrap; /* Ensure flex direction is row and no wrapping */ } -.file-item { +.files-grid-item { min-width: 19%; /* Adjust minWidth to control item width */ } -.item { +.files-item { padding: 2rem; /* Adjust theme.spacing(2) equivalent to 2rem */ text-align: center; color: rgb(117, 117, 117); /* Adjust to theme.palette.text.secondary */ From bd5d9ef09734950ca5b6c56fea6855ca56baafe0 Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Fri, 31 May 2024 10:55:39 -0400 Subject: [PATCH 5/8] Update README.md --- README.md | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index b87cb00..2bfacc1 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,3 @@ -# Getting Started with Create React App +# This branch is for reworking the project to use MUI component Library -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/). +Currently Files.tsx has been reworked From b74eb4f4798f67e71a56025094082bb516760183 Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:00:29 -0400 Subject: [PATCH 6/8] adjust indent to 4 spaces --- .eslintrc.json | 3 ++- src/Files.tsx | 46 +++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 21ae569..024569d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,6 +5,7 @@ ], "rules": { "testing-library/no-container": "off", - "testing-library/no-node-access": "off" + "testing-library/no-node-access": "off", + "indent": ["error", 4] } } diff --git a/src/Files.tsx b/src/Files.tsx index f4963b7..529b684 100644 --- a/src/Files.tsx +++ b/src/Files.tsx @@ -9,29 +9,29 @@ type FilesProps = { } export const Files: React.FC = ({ files }) => { - const globalStore = useGlobalStore(); + const globalStore = useGlobalStore(); - return ( - - - - {files.map((file) => { - const numComments = globalStore.getCommentsForFile(file.id).length; + return ( + + + + {files.map((file) => { + const numComments = globalStore.getCommentsForFile(file.id).length; - return ( - - - {file.title} -



- {numComments} - {' '} - {plural('Comment', numComments)} -
-
- ); - })} -
-
-
- ); + return ( + + + {file.title} +



+ {numComments} + {' '} + {plural('Comment', numComments)} +
+
+ ); + })} +
+
+
+ ); } From caa60632dcdddf38a761dc6324b244e7d31e90e0 Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:14:29 -0400 Subject: [PATCH 7/8] fix failing test --- src/App.test.tsx | 4 ++-- src/Files.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 8e27742..7dd007b 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -176,8 +176,8 @@ describe('App', () => { expect(screen.queryByText(/Loading/)).toBeNull(); }); - expect(container.querySelector('.files #file-1')?.textContent).toContain('Bass.mp3'); - expect(container.querySelector('.files #file-1')?.textContent).toContain('2 Comments'); + expect(container.querySelector('#file-file-1')?.textContent).toContain('Bass.mp3'); + expect(container.querySelector('#file-file-1')?.textContent).toContain('2 Comments'); }); it('should show the comments on the section', async () => { diff --git a/src/Files.tsx b/src/Files.tsx index 529b684..43b1d36 100644 --- a/src/Files.tsx +++ b/src/Files.tsx @@ -19,7 +19,7 @@ export const Files: React.FC = ({ files }) => { const numComments = globalStore.getCommentsForFile(file.id).length; return ( - + {file.title}



From 4f65650e408991626b0f528c5e266678d99ba85d Mon Sep 17 00:00:00 2001 From: Alec Rollison <88508028+aelishRollo@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:16:23 -0400 Subject: [PATCH 8/8] fix lint --- src/ChordProgression.tsx | 14 +++++++------- src/reportWebVitals.ts | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/ChordProgression.tsx b/src/ChordProgression.tsx index c619531..5c1ecba 100644 --- a/src/ChordProgression.tsx +++ b/src/ChordProgression.tsx @@ -6,11 +6,11 @@ type ChordProgressionProps = { export const ChordProgression: React.FC = ({ chordProgression }) => { - return ( -
-
    - {chordProgression.map((chord, index) =>
  1. {chord}
  2. )} -
-
- ); + return ( +
+
    + {chordProgression.map((chord, index) =>
  1. {chord}
  2. )} +
+
+ ); }; diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts index 49a2a16..d95c0a6 100644 --- a/src/reportWebVitals.ts +++ b/src/reportWebVitals.ts @@ -1,15 +1,15 @@ import { ReportHandler } from 'web-vitals'; const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } + if (onPerfEntry && onPerfEntry instanceof Function) { + import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { + getCLS(onPerfEntry); + getFID(onPerfEntry); + getFCP(onPerfEntry); + getLCP(onPerfEntry); + getTTFB(onPerfEntry); + }); + } }; export default reportWebVitals;