import React, { useState } from "react"; import Library from "./Library.jsx"; import BookView from "./BookView.jsx"; import Settings from "./Settings.jsx"; export default function App() { // Permet d'ouvrir un livre directement via #slug (deep-link). const [slug, setSlug] = useState( () => (location.hash ? decodeURIComponent(location.hash.slice(1)) : null) ); const [showSettings, setShowSettings] = useState(false); const goHome = () => { setShowSettings(false); setSlug(null); }; return (