Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Happy Thoughts By Anna #95

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
99b88a0
added components for form, hearts and thought list and corresponding …
Anna2024WebDev Oct 24, 2024
e183141
added function for heart likes and if/else statements for example min…
Anna2024WebDev Oct 24, 2024
21afda0
updated styling to button, form and textarea
Anna2024WebDev Oct 24, 2024
9277a01
added useEffect in ThoughtList to be able to Sync updatedLikes with t…
Anna2024WebDev Oct 24, 2024
cc6d6be
added a lot of styling to the message-box, hearts, hoover effects and…
Anna2024WebDev Oct 25, 2024
88dbd70
more styling to thought-list, thought-message box and button
Anna2024WebDev Oct 25, 2024
5c25f23
added margin to center items
Anna2024WebDev Oct 25, 2024
58b3d68
added responsiveness
Anna2024WebDev Oct 25, 2024
7304602
fixed styling
Anna2024WebDev Oct 26, 2024
9d6b43d
added accessibility to the page such as adding aria labels for the fo…
Anna2024WebDev Oct 26, 2024
82e509f
changed if/else statement for timeDifference so it shows days instead…
Anna2024WebDev Oct 26, 2024
85d70f6
updated title
Anna2024WebDev Oct 26, 2024
f8f62f3
changed font color of header to fix contrast
Anna2024WebDev Oct 26, 2024
97928d1
added viewport meta tag and increased font size to fix the problem wi…
Anna2024WebDev Oct 26, 2024
0a2ba23
more styling
Anna2024WebDev Oct 26, 2024
f2b5456
changed the <meta name viewport and maximum-scale so it fits the acce…
Anna2024WebDev Oct 27, 2024
361d842
fixed styling
Anna2024WebDev Oct 27, 2024
34416d5
added some extra comments to explain the code as well as an icon
Anna2024WebDev Oct 29, 2024
0a3970b
added hover effect to button
Anna2024WebDev Oct 29, 2024
e0eca78
removed redundant code and added more comments to the code
Anna2024WebDev Oct 29, 2024
7d76db8
added more comments to explain the code
Anna2024WebDev Oct 29, 2024
1085647
added more comments to the code
Anna2024WebDev Oct 29, 2024
b950f5e
removed unused code as well as semicolons and consistent in using dou…
Anna2024WebDev Oct 29, 2024
9e6e9dc
small fix
Anna2024WebDev Oct 29, 2024
9ef84e9
tried to push again because of problems with deploy update in netlify
Anna2024WebDev Oct 29, 2024
f931124
try fixing problem with deploy
Anna2024WebDev Oct 29, 2024
a5ad660
try pushing again
Anna2024WebDev Oct 29, 2024
e80b740
tried changing name of Header component and pushing again
Anna2024WebDev Oct 29, 2024
e2d1c23
new try
Anna2024WebDev Oct 29, 2024
70d019e
temporary renamed folders
Anna2024WebDev Oct 30, 2024
995bc51
temp name to komponenter
Anna2024WebDev Oct 30, 2024
891c1bd
commit again to change name on component folder
Anna2024WebDev Oct 30, 2024
3c17ffc
updated h1 font size for mobile
Anna2024WebDev Oct 30, 2024
6f6a7ff
replaced API with my own MongoDB API
Anna2024WebDev Dec 19, 2024
f9fd3c0
changed the order of is loading text
Anna2024WebDev Dec 23, 2024
6a34d66
added styling for loading text
Anna2024WebDev Dec 23, 2024
97dcc58
removed the minimum loading time for loading state
Anna2024WebDev Dec 23, 2024
8184505
added timeout to loading text
Anna2024WebDev Dec 23, 2024
8dce68c
removed redundant code
Anna2024WebDev Dec 23, 2024
4275c31
updated components to optimize time load and error handling
Anna2024WebDev Jan 8, 2025
cb4cfe8
debugging
Anna2024WebDev Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changed the order of is loading text
  • Loading branch information
Anna2024WebDev committed Dec 23, 2024
commit f9fd3c0e549b3d4f8254d5083f63b0cd048e6c77
27 changes: 16 additions & 11 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -40,25 +40,30 @@ export const App = () => {
return (
// Main container for the app
<div className="App">
{/*Header component */}
<Header />
{/* ThoughtForm component, passing down the function to handle new thoughts */}
<ThoughtForm onNewThought={handleNewThought} />
{/* ThoughtList component, passing down the thoughts data */}

{isLoading && <h1>Loading...</h1>} {/* Show loading message while data is being fetched */}
{/* Render the app content once loading is complete */}
{!isLoading && (
<div>
{/*Header component */}
<Header />
{/* ThoughtForm component, passing down the function to handle new thoughts */}
<ThoughtForm onNewThought={handleNewThought} />
{/* ThoughtList component, passing down the thoughts data */}
<ThoughtList thoughts={thoughts} />
</div>
{/* Show loading message while data is being fetched */}
{isLoading ? (
<h2>Loading happy thoughts...</h2>
) : (
<ThoughtList thoughts={thoughts} />
)}
</div>
)
}









{/* Planning of components

// App Component: Main component that manages state and handles API calls.