fixfix?
This commit is contained in:
@@ -9,12 +9,10 @@ import Footer from '../components/Footer/Footer';
|
|||||||
// Debounce hook
|
// Debounce hook
|
||||||
function useDebouncedValue(value, delay = 250) {
|
function useDebouncedValue(value, delay = 250) {
|
||||||
const [debounced, setDebounced] = useState(value);
|
const [debounced, setDebounced] = useState(value);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handler = setTimeout(() => setDebounced(value), delay);
|
const handler = setTimeout(() => setDebounced(value), delay);
|
||||||
return () => clearTimeout(handler);
|
return () => clearTimeout(handler);
|
||||||
}, [value, delay]);
|
}, [value, delay]);
|
||||||
|
|
||||||
return debounced;
|
return debounced;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,14 +51,13 @@ function HomePage() {
|
|||||||
.sort((a, b) => a.name.localeCompare(b.name));
|
.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', minHeight: '100vh' }}>
|
<div style={{ position: 'relative', minHeight: '100vh', paddingBottom: '60px' }}>
|
||||||
{/* Main content scrollable area */}
|
{/* Main content scrollable area */}
|
||||||
<div style={{ display: 'flex', flex: 1, overflow: 'hidden' }}>
|
<div style={{ display: 'flex', height: '100%', overflow: 'hidden' }}>
|
||||||
{/* Left panel: card list */}
|
{/* Left panel: card list */}
|
||||||
<div style={{ flex: 2, borderRight: '1px solid #ccc', padding: '1rem', overflowY: 'auto' }}>
|
<div style={{ flex: 2, borderRight: '1px solid #ccc', padding: '1rem', overflowY: 'auto' }}>
|
||||||
<h2>Card List</h2>
|
<h2>Card List</h2>
|
||||||
<SearchBar searchTerm={searchTerm} setSearchTerm={setSearchTerm} />
|
<SearchBar searchTerm={searchTerm} setSearchTerm={setSearchTerm} />
|
||||||
|
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
style={{ height: '100%' }}
|
style={{ height: '100%' }}
|
||||||
data={filteredCards}
|
data={filteredCards}
|
||||||
@@ -87,8 +84,10 @@ function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Footer at the bottom */}
|
{/* Footer fixed at the bottom */}
|
||||||
<Footer />
|
<div style={{ position: 'fixed', bottom: 0, left: 0, right: 0 }}>
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user