hide mobile footer in dm view, fix ProxyImg
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
689839e043
commit
1d5107bd89
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
@ -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 || "")}
|
||||
/>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user