hide mobile footer in dm view, fix ProxyImg
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Martti Malmi 2023-12-01 17:42:13 +02:00
parent 689839e043
commit 1d5107bd89
4 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ export default function NavLink(props: NavLinkProps) {
const isActive = location.pathname === to.toString();
const handleClick = (event) => {
const handleClick = event => {
if (onClick) {
onClick(event);
}

View File

@ -33,7 +33,7 @@ export const ProxyImg = ({ size, className, promptToLoadDirectly, missingImageEl
</div>
);
}
const src = bypass ? props.src : proxy(props.src ?? "", size);
const src = loadFailed && bypass ? props.src : proxy(props.src ?? "", size);
if (!src || (loadFailed && !bypass)) return missingImageElement;
return (
<img

View File

@ -1,5 +1,5 @@
import "./Layout.css";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useCallback } from "react";
import { Outlet, useLocation } from "react-router-dom";
import Icon from "@/Icons/Icon";
@ -59,7 +59,7 @@ export default function Index() {
</div>
<LoginUnlock />
{isStalker && <StalkerModal id={id} />}
{!shouldHideFooter && <Footer/>}
{!shouldHideFooter && <Footer />}
</div>
);
}

View File

@ -357,6 +357,8 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) {
return <TabElement key={v.value} t={v} tab={tab} setTab={setTab} />;
}
const bannerWidth = Math.min(window.innerWidth, 940);
return (
<>
<div className="profile">
@ -365,7 +367,7 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) {
alt="banner"
className="banner pointer"
src={user.banner}
size={940}
size={bannerWidth}
onClick={() => setModalImage(user.banner || "")}
/>
)}