diff --git a/cryptide_project/package-lock.json b/cryptide_project/package-lock.json index 14a8bc0..833af40 100644 --- a/cryptide_project/package-lock.json +++ b/cryptide_project/package-lock.json @@ -27,6 +27,7 @@ "react-icons": "^4.11.0", "react-intl": "^6.5.2", "react-router-dom": "^6.18.0", + "react-router-hash-link": "^2.4.3", "react-scripts": "5.0.1", "react-switch": "^7.0.0", "socket.io": "^4.7.2", @@ -36,6 +37,7 @@ "web-vitals": "^2.1.4" }, "devDependencies": { + "@types/react-router-hash-link": "^2.4.9", "@types/uuid": "^9.0.7" } }, @@ -4289,6 +4291,12 @@ "integrity": "sha512-pdGBkAh4ggfXAkiwgmTdROJe3mwvLWJYm6JiaAwCtskAU0Weh+JQyyMTbhvxjxD2n8sr8PrxVwyDzmpnK4pUrQ==", "peer": true }, + "node_modules/@types/history": { + "version": "4.7.11", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", + "integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==", + "dev": true + }, "node_modules/@types/hoist-non-react-statics": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", @@ -4459,6 +4467,38 @@ "@types/react": "*" } }, + "node_modules/@types/react-router": { + "version": "5.1.20", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz", + "integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==", + "dev": true, + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*" + } + }, + "node_modules/@types/react-router-dom": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz", + "integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==", + "dev": true, + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router": "*" + } + }, + "node_modules/@types/react-router-hash-link": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/@types/react-router-hash-link/-/react-router-hash-link-2.4.9.tgz", + "integrity": "sha512-zl/VMj+lfJZhvjOAQXIlBVPNKSK+/fRG8AUHhlP9++LhlA2ziLeTmbRxIMJI3PCiCTS+W/FosEoDRoNOGH0OzA==", + "dev": true, + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-dom": "^5.3.0" + } + }, "node_modules/@types/react-transition-group": { "version": "4.4.8", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.8.tgz", @@ -14831,6 +14871,18 @@ "react-dom": ">=16.8" } }, + "node_modules/react-router-hash-link": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/react-router-hash-link/-/react-router-hash-link-2.4.3.tgz", + "integrity": "sha512-NU7GWc265m92xh/aYD79Vr1W+zAIXDWp3L2YZOYP4rCqPnJ6LI6vh3+rKgkidtYijozHclaEQTAHaAaMWPVI4A==", + "dependencies": { + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": ">=15", + "react-router-dom": ">=4" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/cryptide_project/package.json b/cryptide_project/package.json index c3658bd..7417321 100644 --- a/cryptide_project/package.json +++ b/cryptide_project/package.json @@ -21,13 +21,11 @@ "react-icons": "^4.11.0", "react-intl": "^6.5.2", "react-router-dom": "^6.18.0", + "react-router-hash-link": "^2.4.3", "react-scripts": "5.0.1", "react-switch": "^7.0.0", "socket.io": "^4.7.2", "socket.io-client": "^4.7.2", - "socket.io": "^4.7.2", - "socket.io-client": "^4.7.2", - "react-switch": "^7.0.0", "typescript": "^5.2.2", "vis-network": "^9.1.9", "web-vitals": "^2.1.4" @@ -57,6 +55,7 @@ ] }, "devDependencies": { + "@types/react-router-hash-link": "^2.4.9", "@types/uuid": "^9.0.7" } } diff --git a/cryptide_project/src/Components/IndiceList.tsx b/cryptide_project/src/Components/IndiceList.tsx new file mode 100644 index 0000000..5b77592 --- /dev/null +++ b/cryptide_project/src/Components/IndiceList.tsx @@ -0,0 +1,34 @@ +import React from 'react'; + +/* Style */ +import '../Style/Global.css'; +//import { useTheme } from '../Style/ThemeContext'; + +/* Model */ +import Stub from '../model/Stub'; +import Indice from '../model/Indices/Indice'; + +/* lang */ +import { FormattedMessage } from 'react-intl'; + +interface IndiceListComponentProps { + instance: (new (...args: any[]) => T) | (Function & { prototype: T }); + lang: string; +} + +const IndiceList: React.FC> = ({ instance, lang }) => { + const indices = Stub.GenerateIndice(); + return ( + <> + + + ); +} + +export default IndiceList; diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index 02341ca..0d93dd0 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -172,7 +172,7 @@ const InGame = ({locale, changeLocale}) => {
- +