mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-05 02:45:18 +02:00
Empty sections will be hidden from guests. Fixed temperature value rounding. Added welcome message
This commit is contained in:
parent
882f011d07
commit
d110d9b732
11 changed files with 80 additions and 71 deletions
|
@ -20,12 +20,3 @@
|
|||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.BookmarksMessage {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.BookmarksMessage a {
|
||||
color: var(--color-accent);
|
||||
font-weight: 600;
|
||||
}
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue