diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-11-04 13:47:50 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 13:47:50 +0300 |
| commit | eae19bb1b047b3568e7a9a624b50e80886e56331 (patch) | |
| tree | aa3215377fd1a7714e4c5763f9abf9d7dc7def2b /frontend | |
| parent | fix: remove insert trigger on users, check insert user on login err (#224) (diff) | |
| download | lphub-eae19bb1b047b3568e7a9a624b50e80886e56331.tar.gz lphub-eae19bb1b047b3568e7a9a624b50e80886e56331.tar.bz2 lphub-eae19bb1b047b3568e7a9a624b50e80886e56331.zip | |
feat/frontend: optimizing imports, file extensions (#230)
Co-authored-by: FifthWit <fifthwitbusiness@gmail.com>
Diffstat (limited to 'frontend')
48 files changed, 468 insertions, 138 deletions
diff --git a/frontend/craco.config.js b/frontend/craco.config.js new file mode 100644 index 0000000..79037fa --- /dev/null +++ b/frontend/craco.config.js | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | const CracoAlias = require('craco-alias'); | ||
| 2 | |||
| 3 | module.exports = { | ||
| 4 | plugins: [ | ||
| 5 | { | ||
| 6 | plugin: CracoAlias, | ||
| 7 | options: { | ||
| 8 | source: 'tsconfig', | ||
| 9 | baseUrl: './src', | ||
| 10 | tsConfigPath: './tsconfig.paths.json', | ||
| 11 | }, | ||
| 12 | }, | ||
| 13 | ], | ||
| 14 | }; \ No newline at end of file | ||
diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a77d244..b342a9c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json | |||
| @@ -24,6 +24,10 @@ | |||
| 24 | "react-scripts": "5.0.1", | 24 | "react-scripts": "5.0.1", |
| 25 | "typescript": "^4.9.5", | 25 | "typescript": "^4.9.5", |
| 26 | "web-vitals": "^2.1.4" | 26 | "web-vitals": "^2.1.4" |
| 27 | }, | ||
| 28 | "devDependencies": { | ||
| 29 | "@craco/craco": "^7.1.0", | ||
| 30 | "craco-alias": "^3.0.1" | ||
| 27 | } | 31 | } |
| 28 | }, | 32 | }, |
| 29 | "node_modules/@adobe/css-tools": { | 33 | "node_modules/@adobe/css-tools": { |
| @@ -2019,6 +2023,55 @@ | |||
| 2019 | "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", | 2023 | "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", |
| 2020 | "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" | 2024 | "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" |
| 2021 | }, | 2025 | }, |
| 2026 | "node_modules/@craco/craco": { | ||
| 2027 | "version": "7.1.0", | ||
| 2028 | "resolved": "https://registry.npmjs.org/@craco/craco/-/craco-7.1.0.tgz", | ||
| 2029 | "integrity": "sha512-oRAcPIKYrfPXp9rSzlsDNeOaVtDiKhoyqSXUoqiK24jCkHr4T8m/a2f74yXIzCbIheoUWDOIfWZyRgFgT+cpqA==", | ||
| 2030 | "dev": true, | ||
| 2031 | "license": "Apache-2.0", | ||
| 2032 | "dependencies": { | ||
| 2033 | "autoprefixer": "^10.4.12", | ||
| 2034 | "cosmiconfig": "^7.0.1", | ||
| 2035 | "cosmiconfig-typescript-loader": "^1.0.0", | ||
| 2036 | "cross-spawn": "^7.0.3", | ||
| 2037 | "lodash": "^4.17.21", | ||
| 2038 | "semver": "^7.3.7", | ||
| 2039 | "webpack-merge": "^5.8.0" | ||
| 2040 | }, | ||
| 2041 | "bin": { | ||
| 2042 | "craco": "dist/bin/craco.js" | ||
| 2043 | }, | ||
| 2044 | "engines": { | ||
| 2045 | "node": ">=6" | ||
| 2046 | }, | ||
| 2047 | "peerDependencies": { | ||
| 2048 | "react-scripts": "^5.0.0" | ||
| 2049 | } | ||
| 2050 | }, | ||
| 2051 | "node_modules/@cspotcode/source-map-support": { | ||
| 2052 | "version": "0.8.1", | ||
| 2053 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", | ||
| 2054 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", | ||
| 2055 | "devOptional": true, | ||
| 2056 | "license": "MIT", | ||
| 2057 | "dependencies": { | ||
| 2058 | "@jridgewell/trace-mapping": "0.3.9" | ||
| 2059 | }, | ||
| 2060 | "engines": { | ||
| 2061 | "node": ">=12" | ||
| 2062 | } | ||
| 2063 | }, | ||
| 2064 | "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { | ||
| 2065 | "version": "0.3.9", | ||
| 2066 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", | ||
| 2067 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", | ||
| 2068 | "devOptional": true, | ||
| 2069 | "license": "MIT", | ||
| 2070 | "dependencies": { | ||
| 2071 | "@jridgewell/resolve-uri": "^3.0.3", | ||
| 2072 | "@jridgewell/sourcemap-codec": "^1.4.10" | ||
| 2073 | } | ||
| 2074 | }, | ||
| 2022 | "node_modules/@csstools/normalize.css": { | 2075 | "node_modules/@csstools/normalize.css": { |
| 2023 | "version": "12.1.1", | 2076 | "version": "12.1.1", |
| 2024 | "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-12.1.1.tgz", | 2077 | "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-12.1.1.tgz", |
| @@ -3932,6 +3985,34 @@ | |||
| 3932 | "node": ">=10.13.0" | 3985 | "node": ">=10.13.0" |
| 3933 | } | 3986 | } |
| 3934 | }, | 3987 | }, |
| 3988 | "node_modules/@tsconfig/node10": { | ||
| 3989 | "version": "1.0.11", | ||
| 3990 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", | ||
| 3991 | "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", | ||
| 3992 | "devOptional": true, | ||
| 3993 | "license": "MIT" | ||
| 3994 | }, | ||
| 3995 | "node_modules/@tsconfig/node12": { | ||
| 3996 | "version": "1.0.11", | ||
| 3997 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", | ||
| 3998 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", | ||
| 3999 | "devOptional": true, | ||
| 4000 | "license": "MIT" | ||
| 4001 | }, | ||
| 4002 | "node_modules/@tsconfig/node14": { | ||
| 4003 | "version": "1.0.3", | ||
| 4004 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", | ||
| 4005 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", | ||
| 4006 | "devOptional": true, | ||
| 4007 | "license": "MIT" | ||
| 4008 | }, | ||
| 4009 | "node_modules/@tsconfig/node16": { | ||
| 4010 | "version": "1.0.4", | ||
| 4011 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", | ||
| 4012 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", | ||
| 4013 | "devOptional": true, | ||
| 4014 | "license": "MIT" | ||
| 4015 | }, | ||
| 3935 | "node_modules/@types/aria-query": { | 4016 | "node_modules/@types/aria-query": { |
| 3936 | "version": "5.0.4", | 4017 | "version": "5.0.4", |
| 3937 | "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", | 4018 | "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", |
| @@ -5981,6 +6062,21 @@ | |||
| 5981 | "wrap-ansi": "^7.0.0" | 6062 | "wrap-ansi": "^7.0.0" |
| 5982 | } | 6063 | } |
| 5983 | }, | 6064 | }, |
| 6065 | "node_modules/clone-deep": { | ||
| 6066 | "version": "4.0.1", | ||
| 6067 | "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", | ||
| 6068 | "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", | ||
| 6069 | "dev": true, | ||
| 6070 | "license": "MIT", | ||
| 6071 | "dependencies": { | ||
| 6072 | "is-plain-object": "^2.0.4", | ||
| 6073 | "kind-of": "^6.0.2", | ||
| 6074 | "shallow-clone": "^3.0.0" | ||
| 6075 | }, | ||
| 6076 | "engines": { | ||
| 6077 | "node": ">=6" | ||
| 6078 | } | ||
| 6079 | }, | ||
| 5984 | "node_modules/co": { | 6080 | "node_modules/co": { |
| 5985 | "version": "4.6.0", | 6081 | "version": "4.6.0", |
| 5986 | "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", | 6082 | "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", |
| @@ -6225,6 +6321,41 @@ | |||
| 6225 | "node": ">=10" | 6321 | "node": ">=10" |
| 6226 | } | 6322 | } |
| 6227 | }, | 6323 | }, |
| 6324 | "node_modules/cosmiconfig-typescript-loader": { | ||
| 6325 | "version": "1.0.9", | ||
| 6326 | "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-1.0.9.tgz", | ||
| 6327 | "integrity": "sha512-tRuMRhxN4m1Y8hP9SNYfz7jRwt8lZdWxdjg/ohg5esKmsndJIn4yT96oJVcf5x0eA11taXl+sIp+ielu529k6g==", | ||
| 6328 | "dev": true, | ||
| 6329 | "license": "MIT", | ||
| 6330 | "dependencies": { | ||
| 6331 | "cosmiconfig": "^7", | ||
| 6332 | "ts-node": "^10.7.0" | ||
| 6333 | }, | ||
| 6334 | "engines": { | ||
| 6335 | "node": ">=12", | ||
| 6336 | "npm": ">=6" | ||
| 6337 | }, | ||
| 6338 | "peerDependencies": { | ||
| 6339 | "@types/node": "*", | ||
| 6340 | "cosmiconfig": ">=7", | ||
| 6341 | "typescript": ">=3" | ||
| 6342 | } | ||
| 6343 | }, | ||
| 6344 | "node_modules/craco-alias": { | ||
| 6345 | "version": "3.0.1", | ||
| 6346 | "resolved": "https://registry.npmjs.org/craco-alias/-/craco-alias-3.0.1.tgz", | ||
| 6347 | "integrity": "sha512-N+Qaf/Gr/f3o5ZH2TQjMu5NhR9PnT1ZYsfejpNvZPpB0ujdrhsSr4Ct6GVjnV5ostCVquhTKJpIVBKyL9qDQYA==", | ||
| 6348 | "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", | ||
| 6349 | "dev": true, | ||
| 6350 | "license": "MIT" | ||
| 6351 | }, | ||
| 6352 | "node_modules/create-require": { | ||
| 6353 | "version": "1.1.1", | ||
| 6354 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", | ||
| 6355 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", | ||
| 6356 | "devOptional": true, | ||
| 6357 | "license": "MIT" | ||
| 6358 | }, | ||
| 6228 | "node_modules/cross-spawn": { | 6359 | "node_modules/cross-spawn": { |
| 6229 | "version": "7.0.3", | 6360 | "version": "7.0.3", |
| 6230 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", | 6361 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", |
| @@ -6892,6 +7023,16 @@ | |||
| 6892 | "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", | 7023 | "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", |
| 6893 | "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" | 7024 | "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" |
| 6894 | }, | 7025 | }, |
| 7026 | "node_modules/diff": { | ||
| 7027 | "version": "4.0.2", | ||
| 7028 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", | ||
| 7029 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", | ||
| 7030 | "devOptional": true, | ||
| 7031 | "license": "BSD-3-Clause", | ||
| 7032 | "engines": { | ||
| 7033 | "node": ">=0.3.1" | ||
| 7034 | } | ||
| 7035 | }, | ||
| 6895 | "node_modules/diff-sequences": { | 7036 | "node_modules/diff-sequences": { |
| 6896 | "version": "27.5.1", | 7037 | "version": "27.5.1", |
| 6897 | "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", | 7038 | "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", |
| @@ -8401,6 +8542,16 @@ | |||
| 8401 | "node": ">=8" | 8542 | "node": ">=8" |
| 8402 | } | 8543 | } |
| 8403 | }, | 8544 | }, |
| 8545 | "node_modules/flat": { | ||
| 8546 | "version": "5.0.2", | ||
| 8547 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", | ||
| 8548 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", | ||
| 8549 | "dev": true, | ||
| 8550 | "license": "BSD-3-Clause", | ||
| 8551 | "bin": { | ||
| 8552 | "flat": "cli.js" | ||
| 8553 | } | ||
| 8554 | }, | ||
| 8404 | "node_modules/flat-cache": { | 8555 | "node_modules/flat-cache": { |
| 8405 | "version": "3.2.0", | 8556 | "version": "3.2.0", |
| 8406 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", | 8557 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", |
| @@ -9831,6 +9982,19 @@ | |||
| 9831 | "url": "https://github.com/sponsors/sindresorhus" | 9982 | "url": "https://github.com/sponsors/sindresorhus" |
| 9832 | } | 9983 | } |
| 9833 | }, | 9984 | }, |
| 9985 | "node_modules/is-plain-object": { | ||
| 9986 | "version": "2.0.4", | ||
| 9987 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", | ||
| 9988 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", | ||
| 9989 | "dev": true, | ||
| 9990 | "license": "MIT", | ||
| 9991 | "dependencies": { | ||
| 9992 | "isobject": "^3.0.1" | ||
| 9993 | }, | ||
| 9994 | "engines": { | ||
| 9995 | "node": ">=0.10.0" | ||
| 9996 | } | ||
| 9997 | }, | ||
| 9834 | "node_modules/is-potential-custom-element-name": { | 9998 | "node_modules/is-potential-custom-element-name": { |
| 9835 | "version": "1.0.1", | 9999 | "version": "1.0.1", |
| 9836 | "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", | 10000 | "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", |
| @@ -10008,6 +10172,16 @@ | |||
| 10008 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", | 10172 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", |
| 10009 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" | 10173 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" |
| 10010 | }, | 10174 | }, |
| 10175 | "node_modules/isobject": { | ||
| 10176 | "version": "3.0.1", | ||
| 10177 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", | ||
| 10178 | "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", | ||
| 10179 | "dev": true, | ||
| 10180 | "license": "MIT", | ||
| 10181 | "engines": { | ||
| 10182 | "node": ">=0.10.0" | ||
| 10183 | } | ||
| 10184 | }, | ||
| 10011 | "node_modules/istanbul-lib-coverage": { | 10185 | "node_modules/istanbul-lib-coverage": { |
| 10012 | "version": "3.2.2", | 10186 | "version": "3.2.2", |
| 10013 | "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", | 10187 | "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", |
| @@ -12500,6 +12674,13 @@ | |||
| 12500 | "semver": "bin/semver.js" | 12674 | "semver": "bin/semver.js" |
| 12501 | } | 12675 | } |
| 12502 | }, | 12676 | }, |
| 12677 | "node_modules/make-error": { | ||
| 12678 | "version": "1.3.6", | ||
| 12679 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", | ||
| 12680 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", | ||
| 12681 | "devOptional": true, | ||
| 12682 | "license": "ISC" | ||
| 12683 | }, | ||
| 12503 | "node_modules/makeerror": { | 12684 | "node_modules/makeerror": { |
| 12504 | "version": "1.0.12", | 12685 | "version": "1.0.12", |
| 12505 | "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", | 12686 | "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", |
| @@ -16559,6 +16740,19 @@ | |||
| 16559 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", | 16740 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", |
| 16560 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" | 16741 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" |
| 16561 | }, | 16742 | }, |
| 16743 | "node_modules/shallow-clone": { | ||
| 16744 | "version": "3.0.1", | ||
| 16745 | "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", | ||
| 16746 | "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", | ||
| 16747 | "dev": true, | ||
| 16748 | "license": "MIT", | ||
| 16749 | "dependencies": { | ||
| 16750 | "kind-of": "^6.0.2" | ||
| 16751 | }, | ||
| 16752 | "engines": { | ||
| 16753 | "node": ">=8" | ||
| 16754 | } | ||
| 16755 | }, | ||
| 16562 | "node_modules/shebang-command": { | 16756 | "node_modules/shebang-command": { |
| 16563 | "version": "2.0.0", | 16757 | "version": "2.0.0", |
| 16564 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", | 16758 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", |
| @@ -17683,6 +17877,70 @@ | |||
| 17683 | "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", | 17877 | "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", |
| 17684 | "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" | 17878 | "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" |
| 17685 | }, | 17879 | }, |
| 17880 | "node_modules/ts-node": { | ||
| 17881 | "version": "10.9.2", | ||
| 17882 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", | ||
| 17883 | "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", | ||
| 17884 | "devOptional": true, | ||
| 17885 | "license": "MIT", | ||
| 17886 | "dependencies": { | ||
| 17887 | "@cspotcode/source-map-support": "^0.8.0", | ||
| 17888 | "@tsconfig/node10": "^1.0.7", | ||
| 17889 | "@tsconfig/node12": "^1.0.7", | ||
| 17890 | "@tsconfig/node14": "^1.0.0", | ||
| 17891 | "@tsconfig/node16": "^1.0.2", | ||
| 17892 | "acorn": "^8.4.1", | ||
| 17893 | "acorn-walk": "^8.1.1", | ||
| 17894 | "arg": "^4.1.0", | ||
| 17895 | "create-require": "^1.1.0", | ||
| 17896 | "diff": "^4.0.1", | ||
| 17897 | "make-error": "^1.1.1", | ||
| 17898 | "v8-compile-cache-lib": "^3.0.1", | ||
| 17899 | "yn": "3.1.1" | ||
| 17900 | }, | ||
| 17901 | "bin": { | ||
| 17902 | "ts-node": "dist/bin.js", | ||
| 17903 | "ts-node-cwd": "dist/bin-cwd.js", | ||
| 17904 | "ts-node-esm": "dist/bin-esm.js", | ||
| 17905 | "ts-node-script": "dist/bin-script.js", | ||
| 17906 | "ts-node-transpile-only": "dist/bin-transpile.js", | ||
| 17907 | "ts-script": "dist/bin-script-deprecated.js" | ||
| 17908 | }, | ||
| 17909 | "peerDependencies": { | ||
| 17910 | "@swc/core": ">=1.2.50", | ||
| 17911 | "@swc/wasm": ">=1.2.50", | ||
| 17912 | "@types/node": "*", | ||
| 17913 | "typescript": ">=2.7" | ||
| 17914 | }, | ||
| 17915 | "peerDependenciesMeta": { | ||
| 17916 | "@swc/core": { | ||
| 17917 | "optional": true | ||
| 17918 | }, | ||
| 17919 | "@swc/wasm": { | ||
| 17920 | "optional": true | ||
| 17921 | } | ||
| 17922 | } | ||
| 17923 | }, | ||
| 17924 | "node_modules/ts-node/node_modules/acorn-walk": { | ||
| 17925 | "version": "8.3.4", | ||
| 17926 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", | ||
| 17927 | "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", | ||
| 17928 | "devOptional": true, | ||
| 17929 | "license": "MIT", | ||
| 17930 | "dependencies": { | ||
| 17931 | "acorn": "^8.11.0" | ||
| 17932 | }, | ||
| 17933 | "engines": { | ||
| 17934 | "node": ">=0.4.0" | ||
| 17935 | } | ||
| 17936 | }, | ||
| 17937 | "node_modules/ts-node/node_modules/arg": { | ||
| 17938 | "version": "4.1.3", | ||
| 17939 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", | ||
| 17940 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", | ||
| 17941 | "devOptional": true, | ||
| 17942 | "license": "MIT" | ||
| 17943 | }, | ||
| 17686 | "node_modules/tsconfig-paths": { | 17944 | "node_modules/tsconfig-paths": { |
| 17687 | "version": "3.15.0", | 17945 | "version": "3.15.0", |
| 17688 | "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", | 17946 | "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", |
| @@ -18142,6 +18400,13 @@ | |||
| 18142 | "uuid": "dist/bin/uuid" | 18400 | "uuid": "dist/bin/uuid" |
| 18143 | } | 18401 | } |
| 18144 | }, | 18402 | }, |
| 18403 | "node_modules/v8-compile-cache-lib": { | ||
| 18404 | "version": "3.0.1", | ||
| 18405 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", | ||
| 18406 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", | ||
| 18407 | "devOptional": true, | ||
| 18408 | "license": "MIT" | ||
| 18409 | }, | ||
| 18145 | "node_modules/v8-to-istanbul": { | 18410 | "node_modules/v8-to-istanbul": { |
| 18146 | "version": "8.1.1", | 18411 | "version": "8.1.1", |
| 18147 | "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", | 18412 | "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", |
| @@ -18436,6 +18701,21 @@ | |||
| 18436 | "node": ">=10.13.0" | 18701 | "node": ">=10.13.0" |
| 18437 | } | 18702 | } |
| 18438 | }, | 18703 | }, |
| 18704 | "node_modules/webpack-merge": { | ||
| 18705 | "version": "5.10.0", | ||
| 18706 | "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", | ||
| 18707 | "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", | ||
| 18708 | "dev": true, | ||
| 18709 | "license": "MIT", | ||
| 18710 | "dependencies": { | ||
| 18711 | "clone-deep": "^4.0.1", | ||
| 18712 | "flat": "^5.0.2", | ||
| 18713 | "wildcard": "^2.0.0" | ||
| 18714 | }, | ||
| 18715 | "engines": { | ||
| 18716 | "node": ">=10.0.0" | ||
| 18717 | } | ||
| 18718 | }, | ||
| 18439 | "node_modules/webpack-sources": { | 18719 | "node_modules/webpack-sources": { |
| 18440 | "version": "3.2.3", | 18720 | "version": "3.2.3", |
| 18441 | "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", | 18721 | "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", |
| @@ -18633,6 +18913,13 @@ | |||
| 18633 | "url": "https://github.com/sponsors/ljharb" | 18913 | "url": "https://github.com/sponsors/ljharb" |
| 18634 | } | 18914 | } |
| 18635 | }, | 18915 | }, |
| 18916 | "node_modules/wildcard": { | ||
| 18917 | "version": "2.0.1", | ||
| 18918 | "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", | ||
| 18919 | "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", | ||
| 18920 | "dev": true, | ||
| 18921 | "license": "MIT" | ||
| 18922 | }, | ||
| 18636 | "node_modules/word-wrap": { | 18923 | "node_modules/word-wrap": { |
| 18637 | "version": "1.2.5", | 18924 | "version": "1.2.5", |
| 18638 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", | 18925 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", |
| @@ -19122,6 +19409,16 @@ | |||
| 19122 | "node": ">=10" | 19409 | "node": ">=10" |
| 19123 | } | 19410 | } |
| 19124 | }, | 19411 | }, |
| 19412 | "node_modules/yn": { | ||
| 19413 | "version": "3.1.1", | ||
| 19414 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", | ||
| 19415 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", | ||
| 19416 | "devOptional": true, | ||
| 19417 | "license": "MIT", | ||
| 19418 | "engines": { | ||
| 19419 | "node": ">=6" | ||
| 19420 | } | ||
| 19421 | }, | ||
| 19125 | "node_modules/yocto-queue": { | 19422 | "node_modules/yocto-queue": { |
| 19126 | "version": "0.1.0", | 19423 | "version": "0.1.0", |
| 19127 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", | 19424 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", |
diff --git a/frontend/package.json b/frontend/package.json index 57c92a7..c317b98 100644 --- a/frontend/package.json +++ b/frontend/package.json | |||
| @@ -21,9 +21,9 @@ | |||
| 21 | "web-vitals": "^2.1.4" | 21 | "web-vitals": "^2.1.4" |
| 22 | }, | 22 | }, |
| 23 | "scripts": { | 23 | "scripts": { |
| 24 | "start": "react-scripts start", | 24 | "start": "craco start", |
| 25 | "build": "react-scripts build", | 25 | "build": "craco build", |
| 26 | "test": "react-scripts test", | 26 | "test": "craco test", |
| 27 | "eject": "react-scripts eject" | 27 | "eject": "react-scripts eject" |
| 28 | }, | 28 | }, |
| 29 | "eslintConfig": { | 29 | "eslintConfig": { |
| @@ -43,5 +43,9 @@ | |||
| 43 | "last 1 firefox version", | 43 | "last 1 firefox version", |
| 44 | "last 1 safari version" | 44 | "last 1 safari version" |
| 45 | ] | 45 | ] |
| 46 | }, | ||
| 47 | "devDependencies": { | ||
| 48 | "@craco/craco": "^7.1.0", | ||
| 49 | "craco-alias": "^3.0.1" | ||
| 46 | } | 50 | } |
| 47 | } | 51 | } |
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c6952b1..e4bde75 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx | |||
| @@ -1,22 +1,22 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Routes, Route } from "react-router-dom"; | 2 | import { Routes, Route } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { UserProfile } from './types/Profile'; | 4 | import { UserProfile } from '@customTypes/Profile'; |
| 5 | import Sidebar from './components/Sidebar'; | 5 | import Sidebar from './components/Sidebar'; |
| 6 | import "./App.css"; | 6 | import "./App.css"; |
| 7 | 7 | ||
| 8 | import Profile from './pages/Profile'; | 8 | import Profile from '@pages/Profile'; |
| 9 | import Games from './pages/Games'; | 9 | import Games from '@pages/Games'; |
| 10 | import Maps from './pages/Maps'; | 10 | import Maps from '@pages/Maps'; |
| 11 | import User from './pages/User'; | 11 | import User from '@pages/User'; |
| 12 | import Homepage from './pages/Homepage'; | 12 | import Homepage from '@pages/Homepage'; |
| 13 | import UploadRunDialog from './components/UploadRunDialog'; | 13 | import UploadRunDialog from './components/UploadRunDialog'; |
| 14 | import Rules from './pages/Rules'; | 14 | import Rules from '@pages/Rules'; |
| 15 | import About from './pages/About'; | 15 | import About from '@pages/About'; |
| 16 | import { Game } from './types/Game'; | 16 | import { Game } from '@customTypes/Game'; |
| 17 | import { API } from './api/Api'; | 17 | import { API } from './api/Api'; |
| 18 | import Maplist from './pages/Maplist'; | 18 | import Maplist from '@pages/Maplist'; |
| 19 | import Rankings from './pages/Rankings'; | 19 | import Rankings from '@pages/Rankings'; |
| 20 | import { get_user_id_from_token, get_user_mod_from_token } from './utils/Jwt'; | 20 | import { get_user_id_from_token, get_user_mod_from_token } from './utils/Jwt'; |
| 21 | 21 | ||
| 22 | const App: React.FC = () => { | 22 | const App: React.FC = () => { |
diff --git a/frontend/src/api/Api.tsx b/frontend/src/api/Api.ts index 053e920..2e55ab4 100644 --- a/frontend/src/api/Api.tsx +++ b/frontend/src/api/Api.ts | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | import { MapDiscussionCommentContent, MapDiscussionContent, ModMenuContent } from '../types/Content'; | 1 | import { MapDiscussionCommentContent, MapDiscussionContent, ModMenuContent } from '@customTypes/Content'; |
| 2 | import { delete_token, get_token } from './Auth'; | 2 | import { delete_token, get_token } from '@api/Auth'; |
| 3 | import { get_user, get_profile, post_profile } from './User'; | 3 | import { get_user, get_profile, post_profile } from '@api/User'; |
| 4 | import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search } from './Games'; | 4 | import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search } from '@api/Games'; |
| 5 | import { get_official_rankings, get_unofficial_rankings } from './Rankings'; | 5 | import { get_official_rankings, get_unofficial_rankings } from '@api/Rankings'; |
| 6 | import { get_map_summary, get_map_leaderboard, get_map_discussions, get_map_discussion, post_map_discussion, post_map_discussion_comment, delete_map_discussion, post_record, delete_map_record } from './Maps'; | 6 | import { get_map_summary, get_map_leaderboard, get_map_discussions, get_map_discussion, post_map_discussion, post_map_discussion_comment, delete_map_discussion, post_record, delete_map_record } from '@api/Maps'; |
| 7 | import { delete_map_summary, post_map_summary, put_map_image, put_map_summary } from './Mod'; | 7 | import { delete_map_summary, post_map_summary, put_map_image, put_map_summary } from '@api/Mod'; |
| 8 | import { UploadRunContent } from '../types/Content'; | 8 | import { UploadRunContent } from '@customTypes/Content'; |
| 9 | 9 | ||
| 10 | // add new api call function entries here | 10 | // add new api call function entries here |
| 11 | // example usage: API.get_games(); | 11 | // example usage: API.get_games(); |
diff --git a/frontend/src/api/Auth.tsx b/frontend/src/api/Auth.ts index 09269e6..875c7e5 100644 --- a/frontend/src/api/Auth.tsx +++ b/frontend/src/api/Auth.ts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | 3 | ||
| 4 | export const get_token = async (): Promise<string | undefined> => { | 4 | export const get_token = async (): Promise<string | undefined> => { |
| 5 | const response = await axios.get(url(`token`)) | 5 | const response = await axios.get(url(`token`)) |
diff --git a/frontend/src/api/Games.tsx b/frontend/src/api/Games.ts index 84b5f74..72bb4b3 100644 --- a/frontend/src/api/Games.tsx +++ b/frontend/src/api/Games.ts | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { GameChapter, GamesChapters } from "../types/Chapters"; | 3 | import { GameChapter, GamesChapters } from "@customTypes/Chapters"; |
| 4 | import { Game } from "../types/Game"; | 4 | import { Game } from "@customTypes/Game"; |
| 5 | import { Map } from "../types/Map"; | 5 | import { Map } from "@customTypes/Map"; |
| 6 | import { Search } from "../types/Search"; | 6 | import { Search } from "@customTypes/Search"; |
| 7 | 7 | ||
| 8 | export const get_games = async (): Promise<Game[]> => { | 8 | export const get_games = async (): Promise<Game[]> => { |
| 9 | const response = await axios.get(url(`games`)) | 9 | const response = await axios.get(url(`games`)) |
diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.ts index fc50293..89657b5 100644 --- a/frontend/src/api/Maps.tsx +++ b/frontend/src/api/Maps.ts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { MapDiscussionContent, UploadRunContent } from "../types/Content"; | 3 | import { MapDiscussionContent, UploadRunContent } from "@customTypes/Content"; |
| 4 | import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion } from "../types/Map"; | 4 | import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion } from "@customTypes/Map"; |
| 5 | 5 | ||
| 6 | export const get_map_summary = async (map_id: string): Promise<MapSummary> => { | 6 | export const get_map_summary = async (map_id: string): Promise<MapSummary> => { |
| 7 | const response = await axios.get(url(`maps/${map_id}/summary`)) | 7 | const response = await axios.get(url(`maps/${map_id}/summary`)) |
diff --git a/frontend/src/api/Mod.tsx b/frontend/src/api/Mod.ts index 9091379..1511f8b 100644 --- a/frontend/src/api/Mod.tsx +++ b/frontend/src/api/Mod.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { ModMenuContent } from "../types/Content"; | 3 | import { ModMenuContent } from "@customTypes/Content"; |
| 4 | 4 | ||
| 5 | export const put_map_image = async (token: string, map_id: string, image: string): Promise<boolean> => { | 5 | export const put_map_image = async (token: string, map_id: string, image: string): Promise<boolean> => { |
| 6 | const response = await axios.put(url(`maps/${map_id}/image`), { | 6 | const response = await axios.put(url(`maps/${map_id}/image`), { |
diff --git a/frontend/src/api/Rankings.tsx b/frontend/src/api/Rankings.ts index 384f826..b8d9bec 100644 --- a/frontend/src/api/Rankings.tsx +++ b/frontend/src/api/Rankings.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { Ranking, SteamRanking } from "../types/Ranking"; | 3 | import { Ranking, SteamRanking } from "@customTypes/Ranking"; |
| 4 | 4 | ||
| 5 | export const get_official_rankings = async (): Promise<Ranking> => { | 5 | export const get_official_rankings = async (): Promise<Ranking> => { |
| 6 | const response = await axios.get(url(`rankings/lphub`)); | 6 | const response = await axios.get(url(`rankings/lphub`)); |
diff --git a/frontend/src/api/User.tsx b/frontend/src/api/User.ts index c4d1944..88da0f2 100644 --- a/frontend/src/api/User.tsx +++ b/frontend/src/api/User.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { UserProfile } from "../types/Profile"; | 3 | import { UserProfile } from "@customTypes/Profile"; |
| 4 | 4 | ||
| 5 | export const get_user = async (user_id: string): Promise<UserProfile> => { | 5 | export const get_user = async (user_id: string): Promise<UserProfile> => { |
| 6 | const response = await axios.get(url(`users/${user_id}`)); | 6 | const response = await axios.get(url(`users/${user_id}`)); |
diff --git a/frontend/src/components/ConfirmDialog.tsx b/frontend/src/components/ConfirmDialog.tsx index c4299fd..44a653b 100644 --- a/frontend/src/components/ConfirmDialog.tsx +++ b/frontend/src/components/ConfirmDialog.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "../css/Dialog.css" | 3 | import "@css/Dialog.css" |
| 4 | 4 | ||
| 5 | interface ConfirmDialogProps { | 5 | interface ConfirmDialogProps { |
| 6 | title: string; | 6 | title: string; |
diff --git a/frontend/src/components/Discussions.tsx b/frontend/src/components/Discussions.tsx index 0522910..17ae586 100644 --- a/frontend/src/components/Discussions.tsx +++ b/frontend/src/components/Discussions.tsx | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import { MapDiscussion, MapDiscussions, MapDiscussionsDetail } from '../types/Map'; | 3 | import { MapDiscussion, MapDiscussions, MapDiscussionsDetail } from '@customTypes/Map'; |
| 4 | import { MapDiscussionCommentContent, MapDiscussionContent } from '../types/Content'; | 4 | import { MapDiscussionCommentContent, MapDiscussionContent } from '@customTypes/Content'; |
| 5 | import { time_ago } from '../utils/Time'; | 5 | import { time_ago } from '@utils/Time'; |
| 6 | import { API } from '../api/Api'; | 6 | import { API } from '@api/Api'; |
| 7 | import "../css/Maps.css" | 7 | import "@css/Maps.css" |
| 8 | import { Link } from 'react-router-dom'; | 8 | import { Link } from 'react-router-dom'; |
| 9 | import useConfirm from '../hooks/UseConfirm'; | 9 | import useConfirm from '@hooks/UseConfirm'; |
| 10 | 10 | ||
| 11 | interface DiscussionsProps { | 11 | interface DiscussionsProps { |
| 12 | token?: string | 12 | token?: string |
diff --git a/frontend/src/components/GameCategory.tsx b/frontend/src/components/GameCategory.tsx index 3291e09..d8879ef 100644 --- a/frontend/src/components/GameCategory.tsx +++ b/frontend/src/components/GameCategory.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { Game, GameCategoryPortals } from '../types/Game'; | 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; |
| 5 | import "../css/Games.css" | 5 | import "@css/Games.css" |
| 6 | 6 | ||
| 7 | interface GameCategoryProps { | 7 | interface GameCategoryProps { |
| 8 | game: Game; | 8 | game: Game; |
diff --git a/frontend/src/components/GameEntry.tsx b/frontend/src/components/GameEntry.tsx index ced40ee..3bd2842 100644 --- a/frontend/src/components/GameEntry.tsx +++ b/frontend/src/components/GameEntry.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { Game, GameCategoryPortals } from '../types/Game'; | 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; |
| 5 | import "../css/Games.css" | 5 | import "@css/Games.css" |
| 6 | 6 | ||
| 7 | import GameCategory from './GameCategory'; | 7 | import GameCategory from '@components/GameCategory'; |
| 8 | 8 | ||
| 9 | interface GameEntryProps { | 9 | interface GameEntryProps { |
| 10 | game: Game; | 10 | game: Game; |
diff --git a/frontend/src/components/Leaderboards.tsx b/frontend/src/components/Leaderboards.tsx index aaaee62..4a8b463 100644 --- a/frontend/src/components/Leaderboards.tsx +++ b/frontend/src/components/Leaderboards.tsx | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from 'react-router-dom'; | 2 | import { Link } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { DownloadIcon, ThreedotIcon } from '../images/Images'; | 4 | import { DownloadIcon, ThreedotIcon } from '@images/Images'; |
| 5 | import { MapLeaderboard } from '../types/Map'; | 5 | import { MapLeaderboard } from '@customTypes/Map'; |
| 6 | import { ticks_to_time, time_ago } from '../utils/Time'; | 6 | import { ticks_to_time, time_ago } from '@utils/Time'; |
| 7 | import useMessage from "../hooks/UseMessage"; | 7 | import useMessage from "@hooks/UseMessage"; |
| 8 | import "../css/Maps.css" | 8 | import "@css/Maps.css" |
| 9 | 9 | ||
| 10 | interface LeaderboardsProps { | 10 | interface LeaderboardsProps { |
| 11 | data?: MapLeaderboard; | 11 | data?: MapLeaderboard; |
diff --git a/frontend/src/components/Login.tsx b/frontend/src/components/Login.tsx index 545f724..f1628b2 100644 --- a/frontend/src/components/Login.tsx +++ b/frontend/src/components/Login.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useNavigate } from 'react-router-dom'; | 2 | import { Link, useNavigate } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { ExitIcon, UserIcon, LoginIcon } from '../images/Images'; | 4 | import { ExitIcon, UserIcon, LoginIcon } from '@images/Images'; |
| 5 | import { UserProfile } from '../types/Profile'; | 5 | import { UserProfile } from '@customTypes/Profile'; |
| 6 | import { API } from '../api/Api'; | 6 | import { API } from '@api/Api'; |
| 7 | import "../css/Login.css"; | 7 | import "@css/Login.css"; |
| 8 | 8 | ||
| 9 | interface LoginProps { | 9 | interface LoginProps { |
| 10 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; | 10 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; |
diff --git a/frontend/src/components/MessageDialog.tsx b/frontend/src/components/MessageDialog.tsx index 17b1258..5c85189 100644 --- a/frontend/src/components/MessageDialog.tsx +++ b/frontend/src/components/MessageDialog.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "../css/Dialog.css" | 3 | import "@css/Dialog.css" |
| 4 | 4 | ||
| 5 | interface MessageDialogProps { | 5 | interface MessageDialogProps { |
| 6 | title: string; | 6 | title: string; |
diff --git a/frontend/src/components/MessageDialogLoad.tsx b/frontend/src/components/MessageDialogLoad.tsx index 381a4a4..966e064 100644 --- a/frontend/src/components/MessageDialogLoad.tsx +++ b/frontend/src/components/MessageDialogLoad.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "../css/Dialog.css" | 3 | import "@css/Dialog.css" |
| 4 | 4 | ||
| 5 | interface MessageDialogLoadProps { | 5 | interface MessageDialogLoadProps { |
| 6 | title: string; | 6 | title: string; |
diff --git a/frontend/src/components/ModMenu.tsx b/frontend/src/components/ModMenu.tsx index 2fb1737..925b8a8 100644 --- a/frontend/src/components/ModMenu.tsx +++ b/frontend/src/components/ModMenu.tsx | |||
| @@ -2,11 +2,11 @@ import React from 'react'; | |||
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | import { useNavigate } from 'react-router-dom'; | 3 | import { useNavigate } from 'react-router-dom'; |
| 4 | 4 | ||
| 5 | import { MapSummary } from '../types/Map'; | 5 | import { MapSummary } from '@customTypes/Map'; |
| 6 | import { ModMenuContent } from '../types/Content'; | 6 | import { ModMenuContent } from '@customTypes/Content'; |
| 7 | import { API } from '../api/Api'; | 7 | import { API } from '@api/Api'; |
| 8 | import "../css/ModMenu.css" | 8 | import "@css/ModMenu.css" |
| 9 | import useConfirm from '../hooks/UseConfirm'; | 9 | import useConfirm from '@hooks/UseConfirm'; |
| 10 | 10 | ||
| 11 | interface ModMenuProps { | 11 | interface ModMenuProps { |
| 12 | token?: string; | 12 | token?: string; |
diff --git a/frontend/src/components/RankingEntry.tsx b/frontend/src/components/RankingEntry.tsx index 25b0201..b899965 100644 --- a/frontend/src/components/RankingEntry.tsx +++ b/frontend/src/components/RankingEntry.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | import { RankingType, SteamRanking, SteamRankingType } from '../types/Ranking'; | 3 | import { RankingType, SteamRanking, SteamRankingType } from '@customTypes/Ranking'; |
| 4 | 4 | ||
| 5 | enum RankingCategories { | 5 | enum RankingCategories { |
| 6 | rankings_overall, | 6 | rankings_overall, |
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index 5757183..67f7f3d 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation } from 'react-router-dom'; | 2 | import { Link, useLocation } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { BookIcon, FlagIcon, HelpIcon, HomeIcon, LogoIcon, PortalIcon, SearchIcon, UploadIcon } from '../images/Images'; | 4 | import { BookIcon, FlagIcon, HelpIcon, HomeIcon, LogoIcon, PortalIcon, SearchIcon, UploadIcon } from '@images/Images'; |
| 5 | import Login from './Login'; | 5 | import Login from '@components/Login'; |
| 6 | import { UserProfile } from '../types/Profile'; | 6 | import { UserProfile } from '@customTypes/Profile'; |
| 7 | import { Search } from '../types/Search'; | 7 | import { Search } from '@customTypes/Search'; |
| 8 | import { API } from '../api/Api'; | 8 | import { API } from '@api/Api'; |
| 9 | import "../css/Sidebar.css"; | 9 | import "@css/Sidebar.css"; |
| 10 | 10 | ||
| 11 | interface SidebarProps { | 11 | interface SidebarProps { |
| 12 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; | 12 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; |
diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx index 79e989f..14b02ac 100644 --- a/frontend/src/components/Summary.tsx +++ b/frontend/src/components/Summary.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | 3 | ||
| 4 | import { MapSummary } from '../types/Map'; | 4 | import { MapSummary } from '@customTypes/Map'; |
| 5 | import "../css/Maps.css" | 5 | import "@css/Maps.css" |
| 6 | 6 | ||
| 7 | interface SummaryProps { | 7 | interface SummaryProps { |
| 8 | selectedRun: number | 8 | selectedRun: number |
diff --git a/frontend/src/components/UploadRunDialog.tsx b/frontend/src/components/UploadRunDialog.tsx index 0610377..118b589 100644 --- a/frontend/src/components/UploadRunDialog.tsx +++ b/frontend/src/components/UploadRunDialog.tsx | |||
| @@ -1,15 +1,15 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { UploadRunContent } from '../types/Content'; | 2 | import { UploadRunContent } from '@customTypes/Content'; |
| 3 | import { ScoreboardTempUpdate, SourceDemoParser, NetMessages } from '@nekz/sdp'; | 3 | import { ScoreboardTempUpdate, SourceDemoParser, NetMessages } from '@nekz/sdp'; |
| 4 | 4 | ||
| 5 | import '../css/UploadRunDialog.css'; | 5 | import '@css/UploadRunDialog.css'; |
| 6 | import { Game } from '../types/Game'; | 6 | import { Game } from '@customTypes/Game'; |
| 7 | import { Map } from '../types/Map'; | 7 | import { Map } from '@customTypes/Map'; |
| 8 | import { API } from '../api/Api'; | 8 | import { API } from '@api/Api'; |
| 9 | import { useNavigate } from 'react-router-dom'; | 9 | import { useNavigate } from 'react-router-dom'; |
| 10 | import useMessage from '../hooks/UseMessage'; | 10 | import useMessage from '@hooks/UseMessage'; |
| 11 | import useConfirm from '../hooks/UseConfirm'; | 11 | import useConfirm from '@hooks/UseConfirm'; |
| 12 | import useMessageLoad from "../hooks/UseMessageLoad"; | 12 | import useMessageLoad from "@hooks/UseMessageLoad"; |
| 13 | 13 | ||
| 14 | interface UploadRunDialogProps { | 14 | interface UploadRunDialogProps { |
| 15 | token?: string; | 15 | token?: string; |
diff --git a/frontend/src/hooks/UseConfirm.tsx b/frontend/src/hooks/UseConfirm.tsx index 0d64224..e86d70d 100644 --- a/frontend/src/hooks/UseConfirm.tsx +++ b/frontend/src/hooks/UseConfirm.tsx | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import React, { useState } from 'react'; | 1 | import React, { useState } from 'react'; |
| 2 | import ConfirmDialog from '../components/ConfirmDialog'; | 2 | import ConfirmDialog from '@components/ConfirmDialog'; |
| 3 | 3 | ||
| 4 | const useConfirm = () => { | 4 | const useConfirm = () => { |
| 5 | const [isOpen, setIsOpen] = useState(false); | 5 | const [isOpen, setIsOpen] = useState(false); |
diff --git a/frontend/src/hooks/UseMessage.tsx b/frontend/src/hooks/UseMessage.tsx index 13d8e4f..97ec746 100644 --- a/frontend/src/hooks/UseMessage.tsx +++ b/frontend/src/hooks/UseMessage.tsx | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import React, { useState } from 'react'; | 1 | import React, { useState } from 'react'; |
| 2 | import MessageDialog from "../components/MessageDialog"; | 2 | import MessageDialog from "@components/MessageDialog"; |
| 3 | 3 | ||
| 4 | const useMessage = () => { | 4 | const useMessage = () => { |
| 5 | const [isOpen, setIsOpen] = useState(false); | 5 | const [isOpen, setIsOpen] = useState(false); |
diff --git a/frontend/src/hooks/UseMessageLoad.tsx b/frontend/src/hooks/UseMessageLoad.tsx index defd2b3..228c2b4 100644 --- a/frontend/src/hooks/UseMessageLoad.tsx +++ b/frontend/src/hooks/UseMessageLoad.tsx | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import React, { useState } from 'react'; | 1 | import React, { useState } from 'react'; |
| 2 | import MessageDialogLoad from "../components/MessageDialogLoad"; | 2 | import MessageDialogLoad from "@components/MessageDialogLoad"; |
| 3 | 3 | ||
| 4 | const useMessageLoad = () => { | 4 | const useMessageLoad = () => { |
| 5 | const [isOpen, setIsOpen] = useState(false); | 5 | const [isOpen, setIsOpen] = useState(false); |
diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx index c0883eb..ded3461 100644 --- a/frontend/src/pages/About.tsx +++ b/frontend/src/pages/About.tsx | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | 3 | ||
| 4 | import '../css/About.css'; | 4 | import '@css/About.css'; |
| 5 | 5 | ||
| 6 | const About: React.FC = () => { | 6 | const About: React.FC = () => { |
| 7 | 7 | ||
diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx index ea136c2..15105c9 100644 --- a/frontend/src/pages/Games.tsx +++ b/frontend/src/pages/Games.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import GameEntry from '../components/GameEntry'; | 3 | import GameEntry from '@components/GameEntry'; |
| 4 | import { Game } from '../types/Game'; | 4 | import { Game } from '@customTypes/Game'; |
| 5 | import "../css/Maps.css" | 5 | import "@css/Maps.css" |
| 6 | 6 | ||
| 7 | interface GamesProps { | 7 | interface GamesProps { |
| 8 | games: Game[]; | 8 | games: Game[]; |
diff --git a/frontend/src/pages/Homepage.tsx b/frontend/src/pages/Homepage.tsx index 8c1cd48..68562b6 100644 --- a/frontend/src/pages/Homepage.tsx +++ b/frontend/src/pages/Homepage.tsx | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { PortalIcon } from '../images/Images'; | ||
| 3 | 2 | ||
| 4 | const Homepage: React.FC = () => { | 3 | const Homepage: React.FC = () => { |
| 5 | 4 | ||
diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx index 4c1c172..8fc52b0 100644 --- a/frontend/src/pages/Maplist.tsx +++ b/frontend/src/pages/Maplist.tsx | |||
| @@ -1,11 +1,10 @@ | |||
| 1 | import React, { useEffect } from "react"; | 1 | import React, { useEffect } from "react"; |
| 2 | import { Link, useLocation, useNavigate, useParams } from "react-router-dom"; | 2 | import { Link, useLocation, useNavigate, useParams } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import "../css/Maplist.css"; | 4 | import "@css/Maplist.css"; |
| 5 | import { API } from "../api/Api"; | 5 | import { API } from "@api/Api"; |
| 6 | import { Game, GameChapters } from "../types/Game"; | 6 | import { Game } from "@customTypes/Game"; |
| 7 | import { GameChapter, GamesChapters } from "../types/Chapters"; | 7 | import { GameChapter, GamesChapters } from "@customTypes/Chapters"; |
| 8 | import { Map } from "../types/Map"; | ||
| 9 | 8 | ||
| 10 | const Maplist: React.FC = () => { | 9 | const Maplist: React.FC = () => { |
| 11 | const [game, setGame] = React.useState<Game | null>(null); | 10 | const [game, setGame] = React.useState<Game | null>(null); |
diff --git a/frontend/src/pages/Maps.tsx b/frontend/src/pages/Maps.tsx index 915b5f8..f1daa36 100644 --- a/frontend/src/pages/Maps.tsx +++ b/frontend/src/pages/Maps.tsx | |||
| @@ -1,14 +1,14 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation } from 'react-router-dom'; | 2 | import { Link, useLocation } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { PortalIcon, FlagIcon, ChatIcon } from '../images/Images'; | 4 | import { PortalIcon, FlagIcon, ChatIcon } from '@images/Images'; |
| 5 | import Summary from '../components/Summary'; | 5 | import Summary from '@components/Summary'; |
| 6 | import Leaderboards from '../components/Leaderboards'; | 6 | import Leaderboards from '@components/Leaderboards'; |
| 7 | import Discussions from '../components/Discussions'; | 7 | import Discussions from '@components/Discussions'; |
| 8 | import ModMenu from '../components/ModMenu'; | 8 | import ModMenu from '@components/ModMenu'; |
| 9 | import { MapDiscussions, MapLeaderboard, MapSummary } from '../types/Map'; | 9 | import { MapDiscussions, MapLeaderboard, MapSummary } from '@customTypes/Map'; |
| 10 | import { API } from '../api/Api'; | 10 | import { API } from '@api/Api'; |
| 11 | import "../css/Maps.css"; | 11 | import "@css/Maps.css"; |
| 12 | 12 | ||
| 13 | interface MapProps { | 13 | interface MapProps { |
| 14 | token?: string; | 14 | token?: string; |
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index 590bb9b..f7134a7 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation, useNavigate } from 'react-router-dom'; | 2 | import { Link, useNavigate } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon, DeleteIcon } from '../images/Images'; | 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon, DeleteIcon } from '@images/Images'; |
| 5 | import { UserProfile } from '../types/Profile'; | 5 | import { UserProfile } from '@customTypes/Profile'; |
| 6 | import { Game, GameChapters } from '../types/Game'; | 6 | import { Game, GameChapters } from '@customTypes/Game'; |
| 7 | import { Map } from '../types/Map'; | 7 | import { Map } from '@customTypes/Map'; |
| 8 | import { ticks_to_time } from '../utils/Time'; | 8 | import { ticks_to_time } from '@utils/Time'; |
| 9 | import "../css/Profile.css"; | 9 | import "@css/Profile.css"; |
| 10 | import { API } from '../api/Api'; | 10 | import { API } from '@api/Api'; |
| 11 | import useConfirm from '../hooks/UseConfirm'; | 11 | import useConfirm from '@hooks/UseConfirm'; |
| 12 | import useMessage from '../hooks/UseMessage'; | 12 | import useMessage from '@hooks/UseMessage'; |
| 13 | import useMessageLoad from "../hooks/UseMessageLoad"; | 13 | import useMessageLoad from "@hooks/UseMessageLoad"; |
| 14 | 14 | ||
| 15 | interface ProfileProps { | 15 | interface ProfileProps { |
| 16 | profile?: UserProfile; | 16 | profile?: UserProfile; |
diff --git a/frontend/src/pages/Rankings.tsx b/frontend/src/pages/Rankings.tsx index 1830815..cdb87a8 100644 --- a/frontend/src/pages/Rankings.tsx +++ b/frontend/src/pages/Rankings.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React, { useEffect } from "react"; | 1 | import React, { useEffect } from "react"; |
| 2 | 2 | ||
| 3 | import RankingEntry from "../components/RankingEntry"; | 3 | import RankingEntry from "@components/RankingEntry"; |
| 4 | import { Ranking, SteamRanking, RankingType, SteamRankingType } from "../types/Ranking"; | 4 | import { Ranking, SteamRanking, RankingType, SteamRankingType } from "@customTypes/Ranking"; |
| 5 | import { API } from "../api/Api"; | 5 | import { API } from "@api/Api"; |
| 6 | 6 | ||
| 7 | import "../css/Rankings.css"; | 7 | import "@css/Rankings.css"; |
| 8 | 8 | ||
| 9 | const Rankings: React.FC = () => { | 9 | const Rankings: React.FC = () => { |
| 10 | const [leaderboardData, setLeaderboardData] = React.useState<Ranking | SteamRanking>(); | 10 | const [leaderboardData, setLeaderboardData] = React.useState<Ranking | SteamRanking>(); |
diff --git a/frontend/src/pages/Rules.tsx b/frontend/src/pages/Rules.tsx index 340a9f6..b5625ce 100644 --- a/frontend/src/pages/Rules.tsx +++ b/frontend/src/pages/Rules.tsx | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | 3 | ||
| 4 | import '../css/Rules.css'; | 4 | import '@css/Rules.css'; |
| 5 | 5 | ||
| 6 | const Rules: React.FC = () => { | 6 | const Rules: React.FC = () => { |
| 7 | 7 | ||
diff --git a/frontend/src/pages/User.tsx b/frontend/src/pages/User.tsx index ad230bd..f90d1aa 100644 --- a/frontend/src/pages/User.tsx +++ b/frontend/src/pages/User.tsx | |||
| @@ -1,14 +1,14 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation, useNavigate } from 'react-router-dom'; | 2 | import { Link, useLocation, useNavigate } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon } from '../images/Images'; | 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon } from '@images/Images'; |
| 5 | import { UserProfile } from '../types/Profile'; | 5 | import { UserProfile } from '@customTypes/Profile'; |
| 6 | import { Game, GameChapters } from '../types/Game'; | 6 | import { Game, GameChapters } from '@customTypes/Game'; |
| 7 | import { Map } from '../types/Map'; | 7 | import { Map } from '@customTypes/Map'; |
| 8 | import { API } from '../api/Api'; | 8 | import { API } from '@api/Api'; |
| 9 | import { ticks_to_time } from '../utils/Time'; | 9 | import { ticks_to_time } from '@utils/Time'; |
| 10 | import "../css/Profile.css"; | 10 | import "@css/Profile.css"; |
| 11 | import useMessage from '../hooks/UseMessage'; | 11 | import useMessage from '@hooks/UseMessage'; |
| 12 | 12 | ||
| 13 | interface UserProps { | 13 | interface UserProps { |
| 14 | profile?: UserProfile; | 14 | profile?: UserProfile; |
diff --git a/frontend/src/types/Chapters.tsx b/frontend/src/types/Chapters.ts index 2c0afdd..1d48306 100644 --- a/frontend/src/types/Chapters.tsx +++ b/frontend/src/types/Chapters.ts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import { Game } from "./Game"; | 1 | import type { Game } from "@customTypes/Game"; |
| 2 | import { Map } from "./Map"; | 2 | import type { Map } from "@customTypes/Map"; |
| 3 | 3 | ||
| 4 | interface Chapter { | 4 | interface Chapter { |
| 5 | id: number; | 5 | id: number; |
diff --git a/frontend/src/types/Content.tsx b/frontend/src/types/Content.ts index 42a6917..42a6917 100644 --- a/frontend/src/types/Content.tsx +++ b/frontend/src/types/Content.ts | |||
diff --git a/frontend/src/types/Game.tsx b/frontend/src/types/Game.ts index eb435f6..1a80341 100644 --- a/frontend/src/types/Game.tsx +++ b/frontend/src/types/Game.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { Map } from './Map'; | 1 | import type { Map } from '@customTypes/Map'; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | export interface Game { | 4 | export interface Game { |
diff --git a/frontend/src/types/Map.tsx b/frontend/src/types/Map.ts index 4669e8b..89c66d5 100644 --- a/frontend/src/types/Map.tsx +++ b/frontend/src/types/Map.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import { Category, GameCategoryPortals } from './Game'; | 1 | import type { Category, GameCategoryPortals } from '@customTypes/Game'; |
| 2 | import { Pagination } from './Pagination'; | 2 | import type { Pagination } from '@customTypes/Pagination'; |
| 3 | import { UserShort } from './Profile'; | 3 | import type { UserShort } from '@customTypes/Profile'; |
| 4 | 4 | ||
| 5 | export interface Map { | 5 | export interface Map { |
| 6 | id: number; | 6 | id: number; |
diff --git a/frontend/src/types/Pagination.tsx b/frontend/src/types/Pagination.ts index ccff04b..ccff04b 100644 --- a/frontend/src/types/Pagination.tsx +++ b/frontend/src/types/Pagination.ts | |||
diff --git a/frontend/src/types/Profile.tsx b/frontend/src/types/Profile.ts index 2bb037c..42e5c3e 100644 --- a/frontend/src/types/Profile.tsx +++ b/frontend/src/types/Profile.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { Pagination } from "./Pagination"; | 1 | import type { Pagination } from "@customTypes/Pagination"; |
| 2 | 2 | ||
| 3 | export interface UserShort { | 3 | export interface UserShort { |
| 4 | steam_id: string; | 4 | steam_id: string; |
diff --git a/frontend/src/types/Ranking.tsx b/frontend/src/types/Ranking.ts index b3b26c6..a143355 100644 --- a/frontend/src/types/Ranking.tsx +++ b/frontend/src/types/Ranking.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { UserShort } from "./Profile"; | 1 | import type { UserShort } from "@customTypes/Profile"; |
| 2 | 2 | ||
| 3 | export interface RankingType { | 3 | export interface RankingType { |
| 4 | placement: number; | 4 | placement: number; |
diff --git a/frontend/src/types/Search.tsx b/frontend/src/types/Search.ts index 766311a..d218806 100644 --- a/frontend/src/types/Search.tsx +++ b/frontend/src/types/Search.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { UserShort } from "./Profile"; | 1 | import type { UserShort } from "@customTypes/Profile"; |
| 2 | 2 | ||
| 3 | export interface Search { | 3 | export interface Search { |
| 4 | players: UserShort[]; | 4 | players: UserShort[]; |
diff --git a/frontend/src/utils/Jwt.tsx b/frontend/src/utils/Jwt.ts index ce351fb..ce351fb 100644 --- a/frontend/src/utils/Jwt.tsx +++ b/frontend/src/utils/Jwt.ts | |||
diff --git a/frontend/src/utils/Time.tsx b/frontend/src/utils/Time.ts index b83a7ed..b83a7ed 100644 --- a/frontend/src/utils/Time.tsx +++ b/frontend/src/utils/Time.ts | |||
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index ab0af5e..813525a 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | { | 1 | { |
| 2 | "extends": "./tsconfig.paths.json", | ||
| 2 | "compilerOptions": { | 3 | "compilerOptions": { |
| 3 | "target": "es5", | 4 | "target": "es5", |
| 4 | "lib": [ | 5 | "lib": [ |
| @@ -20,7 +21,7 @@ | |||
| 20 | "resolveJsonModule": true, | 21 | "resolveJsonModule": true, |
| 21 | "isolatedModules": true, | 22 | "isolatedModules": true, |
| 22 | "noEmit": true, | 23 | "noEmit": true, |
| 23 | "jsx": "react-jsx" | 24 | "jsx": "react-jsx", |
| 24 | }, | 25 | }, |
| 25 | "include": [ | 26 | "include": [ |
| 26 | "src" | 27 | "src" |
diff --git a/frontend/tsconfig.paths.json b/frontend/tsconfig.paths.json new file mode 100644 index 0000000..2a33687 --- /dev/null +++ b/frontend/tsconfig.paths.json | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | { | ||
| 2 | "compilerOptions": { | ||
| 3 | "baseUrl": "src", | ||
| 4 | "paths": { | ||
| 5 | "@api/*": ["api/*"], | ||
| 6 | "@components/*": ["components/*"], | ||
| 7 | "@css/*": ["css/*"], | ||
| 8 | "@fonts/*": ["fonts/*"], | ||
| 9 | "@hooks/*": ["hooks/*"], | ||
| 10 | "@images/*": ["images/*"], | ||
| 11 | "@pages/*": ["pages/*"], | ||
| 12 | "@customTypes/*": ["types/*"], | ||
| 13 | "@utils/*": ["utils/*"] | ||
| 14 | } | ||
| 15 | } | ||
| 16 | } \ No newline at end of file | ||