Skip to content

Commit

Permalink
footer update
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyeca committed Dec 15, 2023
1 parent 1ba0c3e commit 7d35432
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions pruebas/01-reading-list/anthonyeca/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './App.css'
import { useState } from 'react'
import { useEffect, useState } from 'react'
import { Book } from './components/Book'
import { BookContainer } from './components/BookContainer'
import data from '../../books.json'
Expand All @@ -8,11 +8,21 @@ import { Category } from './components/Category'
import { Footer } from './components/Footer'

function App() {
const [library, setLibrary] = useState(data.library)
const library = data.library
const [lecture, setLecture] = useState([])
const [filtered, setFiltered] = useState([])
const [activeGenre, setActiveGenre] = useState('')

if (activeGenre !== '') {
localStorage.setItem('category', activeGenre)
}
useEffect(() => {
const localStorageCategory = localStorage.getItem('category')
if (localStorageCategory && localStorageCategory?.length > 1) {
setActiveGenre(localStorageCategory)
}
}, [])

return (
<>
<BookContainer
Expand Down
6 changes: 3 additions & 3 deletions pruebas/01-reading-list/anthonyeca/src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export const Footer = () => {
<a
href="https://github.com/anthonyeca"
target="_blank"
rel="noopener nofollow"
rel="noopener noreferrer nofollow"
aria-label="Github de @anthonyeca"
>
GitHub
</a>
<a
href="https://anthonyeca-dev.netlify.app/"
href="https://anthonyeca.dev/"
target="_blank"
rel="noopener nofollow"
rel="noopener noreferrer nofollow"
aria-label="Portafolio"
>
Portafolio
Expand Down

0 comments on commit 7d35432

Please sign in to comment.