diff --git a/05_react/unterricht/tag42/01_react-with-routes/package-lock.json b/05_react/unterricht/tag42/01_react-with-routes/package-lock.json index a434c9c..094b7f4 100644 --- a/05_react/unterricht/tag42/01_react-with-routes/package-lock.json +++ b/05_react/unterricht/tag42/01_react-with-routes/package-lock.json @@ -1,11 +1,11 @@ { - "name": "02_react-router-simple", + "name": "01_react-with-routes", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "02_react-router-simple", + "name": "01_react-with-routes", "version": "0.0.0", "dependencies": { "bootstrap": "^5.3.8", @@ -15,12 +15,12 @@ "react-router-dom": "^7.18.2" }, "devDependencies": { - "@types/react": "^19.2.17", - "@types/react-dom": "^19.2.3", - "@vitejs/plugin-react": "^6.0.4", - "oxlint": "^1.75.0", + "@types/react": "^19.2.18", + "@types/react-dom": "^19.2.4", + "@vitejs/plugin-react": "^6.0.5", + "oxlint": "^1.78.0", "sass-embedded": "^1.100.0", - "vite": "^8.2.0" + "vite": "^8.2.1" } }, "node_modules/@bufbuild/protobuf": { diff --git a/05_react/unterricht/tag42/01_react-with-routes/package.json b/05_react/unterricht/tag42/01_react-with-routes/package.json index 4cb8737..e64cf28 100644 --- a/05_react/unterricht/tag42/01_react-with-routes/package.json +++ b/05_react/unterricht/tag42/01_react-with-routes/package.json @@ -17,11 +17,11 @@ "react-router-dom": "^7.18.2" }, "devDependencies": { - "@types/react": "^19.2.17", - "@types/react-dom": "^19.2.3", - "@vitejs/plugin-react": "^6.0.4", - "oxlint": "^1.75.0", + "@types/react": "^19.2.18", + "@types/react-dom": "^19.2.4", + "@vitejs/plugin-react": "^6.0.5", + "oxlint": "^1.78.0", "sass-embedded": "^1.100.0", - "vite": "^8.2.0" + "vite": "^8.2.1" } } diff --git a/05_react/unterricht/tag42/01_react-with-routes/src/components/common/Badge.jsx b/05_react/unterricht/tag42/01_react-with-routes/src/components/common/Badge.jsx new file mode 100644 index 0000000..23cedae --- /dev/null +++ b/05_react/unterricht/tag42/01_react-with-routes/src/components/common/Badge.jsx @@ -0,0 +1,11 @@ +const Badge = (props) => { + const { text = '', variant = 'secondary', color = '' } = props; + + return ( + + {text} + + ); + // {text}; +}; +export default Badge; diff --git a/05_react/unterricht/tag42/01_react-with-routes/src/components/navs/Navbar.jsx b/05_react/unterricht/tag42/01_react-with-routes/src/components/navs/Navbar.jsx index 44773cf..bc70c62 100644 --- a/05_react/unterricht/tag42/01_react-with-routes/src/components/navs/Navbar.jsx +++ b/05_react/unterricht/tag42/01_react-with-routes/src/components/navs/Navbar.jsx @@ -1,12 +1,12 @@ -import { Link } from 'react-router-dom'; +import { NavLink } from 'react-router-dom'; const Navbar = (props) => { return ( -