diff --git a/project-docs/wave-03.md b/project-docs/wave-03.md
index 22e175a61..c37267179 100644
--- a/project-docs/wave-03.md
+++ b/project-docs/wave-03.md
@@ -20,6 +20,6 @@ In this wave we will update the components to manage a **like** feature.
## Tests
The tests for this component are integration tests. They don't make assumptions about the implementation details of like feature. The tests verify the following functionality:
-- When the user click on a 🤍 button it changes to a ❤️, and when the user clicks on a ❤️ it changes to a 🤍. This test also verifies that clicking on one `ChatEntry`'s like button (🤍) doesn't change other `ChatEntry`'s buttons.
+- When the user clicks on a 🤍 button it changes to a ❤️, and when the user clicks on a ❤️ it changes to a 🤍. This test also verifies that clicking on one `ChatEntry`'s like button (🤍) doesn't change other `ChatEntry`'s buttons.
- The correct number of filled hearts is displayed at the top of the screen.
- If you make a design decision to use a different emoji, you will need to change the tests accordingly.
diff --git a/src/App.js b/src/App.js
index c10859093..8a105790d 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,16 +1,53 @@
import React from 'react';
import './App.css';
import chatMessages from './data/messages.json';
+// import ChatEntry from './components/ChatEntry';
+import ChatLog from './components/ChatLog';
+import { useState } from 'react';
+
const App = () => {
+ const [chatData, setChatData] = useState(chatMessages);
+ // {
+ // 'sender':'Vladimir',
+ // 'body':'why are you arguing with me',
+ // 'timeStamp':'2018-05-29T22:49:06+00:00',
+ // }
+
+ const updateChatData = (updatedChatEntry) => {
+ const updatedChatEntries = chatData.map((chatEntry) => {
+ if (chatEntry.id === updatedChatEntry.id) {
+ return updatedChatEntry;
+ } else {
+ return chatEntry;
+ }
+ });
+
+ setChatData(updatedChatEntries);
+ };
+
+ const likeCounts = () => {
+ let likeCount = 0;
+ for (let entry of chatData) {
+ if (entry.liked === true) {
+ likeCount += 1;
+ }
+ }
+ return likeCount;
+ };
+
return (