mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-12 07:04:45 +08:00
Empty sections will be hidden from guests. Fixed temperature value rounding. Added welcome message
This commit is contained in:
@@ -5,6 +5,7 @@ import classes from './BookmarkGrid.module.css';
|
||||
import { Category } from '../../../interfaces';
|
||||
|
||||
import { BookmarkCard } from '../BookmarkCard/BookmarkCard';
|
||||
import { Message } from '../../UI';
|
||||
|
||||
interface Props {
|
||||
categories: Category[];
|
||||
@@ -17,11 +18,7 @@ export const BookmarkGrid = (props: Props): JSX.Element => {
|
||||
|
||||
if (props.categories.length) {
|
||||
if (props.searching && !props.categories[0].bookmarks.length) {
|
||||
bookmarks = (
|
||||
<p className={classes.BookmarksMessage}>
|
||||
No bookmarks match your search criteria
|
||||
</p>
|
||||
);
|
||||
bookmarks = <Message>No bookmarks match your search criteria</Message>;
|
||||
} else {
|
||||
bookmarks = (
|
||||
<div className={classes.BookmarkGrid}>
|
||||
@@ -36,17 +33,17 @@ export const BookmarkGrid = (props: Props): JSX.Element => {
|
||||
} else {
|
||||
if (props.totalCategories) {
|
||||
bookmarks = (
|
||||
<p className={classes.BookmarksMessage}>
|
||||
<Message>
|
||||
There are no pinned categories. You can pin them from the{' '}
|
||||
<Link to="/bookmarks">/bookmarks</Link> menu
|
||||
</p>
|
||||
</Message>
|
||||
);
|
||||
} else {
|
||||
bookmarks = (
|
||||
<p className={classes.BookmarksMessage}>
|
||||
<Message>
|
||||
You don't have any bookmarks. You can add a new one from{' '}
|
||||
<Link to="/bookmarks">/bookmarks</Link> menu
|
||||
</p>
|
||||
</Message>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user