diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..6f3a2913e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2a6ed1d5b..7a31e43c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "dependencies": { "luxon": "^2.5.2", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-icons": "^5.5.0" }, "devDependencies": { "@eslint/compat": "^1.2.0", @@ -4497,6 +4498,15 @@ "react": "^18.3.1" } }, + "node_modules/react-icons": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.5.0.tgz", + "integrity": "sha512-MEFcXdkP3dLo8uumGI5xN3lDFNsRtrjbOEKDLD7yv76v4wpnEq2Lt2qeHaQOr34I/wPN3s3+N08WkQ+CW37Xiw==", + "license": "MIT", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", diff --git a/package.json b/package.json index 1a053dda4..84a3a1dcf 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "dependencies": { "luxon": "^2.5.2", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-icons": "^5.5.0" }, "devDependencies": { "@eslint/compat": "^1.2.0", diff --git a/src/App.css b/src/App.css index d97beb4e6..a20a28e85 100644 --- a/src/App.css +++ b/src/App.css @@ -28,6 +28,10 @@ #App header section { background-color: #e0ffff; + font-size: 1.2em; + color: #222; + font-weight: bold; + padding: 1%; } #App .widget { diff --git a/src/App.jsx b/src/App.jsx index 14a7f684d..2a91bb2cc 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,17 +1,36 @@ +import { useState } from 'react'; import './App.css'; +import ChatLog from './components/ChatLog'; +import messages from './data/messages.json'; const App = () => { + const [entries, setEntries] = useState(messages); + + const toggleLike = (id) => { + const updatedEntries = entries.map((entry) => + entry.id === id ? { ...entry, liked: !entry.liked } : entry + ); + setEntries(updatedEntries); + }; + + const totalLikes = entries.filter((entry) => entry.liked).length; + return ( -
Replace with body of ChatEntry
-Replace with TimeStamp component
- +{props.body}
+