🥅 add error-handling for shelf/nightstand
Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>
This commit is contained in:
		
							parent
							
								
									22eb06b47a
								
							
						
					
					
						commit
						cb37a740f4
					
				
					 1 changed files with 14 additions and 6 deletions
				
			
		|  | @ -41,16 +41,24 @@ const sortedYears = Object.keys(booksByYear).sort((a: any, b: any) => b - a); | ||||||
|         <h1 class="text-3xl font-extrabold">📚 ¿Dónde está la biblioteca?</h1> |         <h1 class="text-3xl font-extrabold">📚 ¿Dónde está la biblioteca?</h1> | ||||||
|         <h2 class="text-xl font-semibold">on the shelf</h2> |         <h2 class="text-xl font-semibold">on the shelf</h2> | ||||||
|         <ul class="flex flex-col text-s gap-2 text-l"> |         <ul class="flex flex-col text-s gap-2 text-l"> | ||||||
|             {booksShelf.map((book) => ( |             {booksShelf.length !== 0 ? ( | ||||||
|  |             booksShelf.map((book) => ( | ||||||
|                 <li class="borderbottom">📚 {book.title}</li> |                 <li class="borderbottom">📚 {book.title}</li> | ||||||
|             ))} |             )) | ||||||
|  |           ) : ( | ||||||
|  |             <p>currently empty...</p> | ||||||
|  |           )} | ||||||
|         </ul> |         </ul> | ||||||
| 
 | 
 | ||||||
|         <h2 class="text-xl font-semibold">on the nightstand</h2> |         <h2 class="text-xl font-semibold">on the nightstand</h2> | ||||||
|         <ul> |         <ul  class="flex flex-col text-s gap-2 text-l"> | ||||||
|             {booksReading.map((book) => ( |           {booksReading.length !== 0 ? ( | ||||||
|                 <li class="borderbottom">📖 {book.title}</li> |             booksReading.map((book) => ( | ||||||
|             ))} |               <li class="borderbottom">📖 {book.title}</li> | ||||||
|  |             )) | ||||||
|  |           ) : ( | ||||||
|  |             <p>currently empty...</p> | ||||||
|  |           )} | ||||||
|         </ul> |         </ul> | ||||||
| 
 | 
 | ||||||
|         {sortedYears.map(year => ( |         {sortedYears.map(year => ( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue