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

bug fix for text issue and text alignment #731 and #724 #748

Merged
merged 3 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions src/components/SearchBar/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
align-items: center;
justify-content: center;
}

.text-white {
color: var(--color);
}
5 changes: 2 additions & 3 deletions src/components/SearchBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function SearchBar() {
const [currentPostLink, setCurrentPostLink] = useState("");
const [postText, setPostText] = useState("");
const [posts, setPosts] = useState([]);

const handleSearch = (e) => {
setSearchText(e.target.value);
};
Expand Down Expand Up @@ -55,7 +54,7 @@ function SearchBar() {
// code to filter posts accornding to searchtext

const filteredPosts = posts.filter((post) =>
post.post.username.toLowerCase().includes(searchText.toLowerCase()),
post.post.username.toLowerCase().includes(searchText.toLowerCase())
);

return (
Expand Down Expand Up @@ -95,7 +94,7 @@ function SearchBar() {
))}
</>
) : (
"Nothing to search"
<>{<div className="text-white">Nothing to search</div>}</> // TODO: Employ TailwindCSS here
)}
</div>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ input:focus {
}

.modal__signup {
align-items: center;
display: flex;
justify-content: center;
flex-direction: column;
}

Expand Down
Loading