mirror of
https://github.com/wahyd4/hey-search.git
synced 2026-08-09 05:06:23 +10:00
revert: restore background image display on home page
Reverted the isHomeWithBg useEffect and min-h-dvh changes that broke
the background image. Back to the working state from commit 6ca4763.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+1
-11
@@ -73,16 +73,6 @@ function App() {
|
||||
getBookmarkedUrls().then(setBookmarkedUrls).catch(() => {});
|
||||
}, []);
|
||||
|
||||
// On iOS, rubber-band overscroll reveals the <html> background behind the page.
|
||||
// Set it to black when the home page has an active background image so overscroll
|
||||
// zones show black instead of white. Cleared on teardown or when leaving home.
|
||||
const isHomeWithBg = !hasSearched && !!(bgInfo?.enabled && bgInfo?.url);
|
||||
useEffect(() => {
|
||||
const el = document.documentElement;
|
||||
el.style.backgroundColor = isHomeWithBg ? "#000" : "";
|
||||
return () => { el.style.backgroundColor = ""; };
|
||||
}, [isHomeWithBg]);
|
||||
|
||||
const doSearch = useCallback(
|
||||
async (q: string, cat: Category = category, p: number = 1, size: ImageSize = imageSize, updateUrl = true) => {
|
||||
if (!q.trim()) return;
|
||||
@@ -262,7 +252,7 @@ function App() {
|
||||
// Home page (no search yet)
|
||||
if (!hasSearched) {
|
||||
return (
|
||||
<div className="relative flex min-h-dvh flex-col">
|
||||
<div className="relative flex min-h-screen flex-col">
|
||||
{/* Background image */}
|
||||
{bgUrl && (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user