React Map Optimization, [missing map keys ] (#283)
* comment unused import ( minmizes js ) * Add keys missing keys on map for better React Diff * [ImgBot] Optimize images *Total -- 821.02kb -> 674.06kb (17.9%) /public/nostrich_512.png -- 650.16kb -> 527.94kb (18.8%) /public/nostrich_256.png -- 170.86kb -> 146.12kb (14.48%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com> --------- Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com> Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
This commit is contained in:
@ -12,7 +12,7 @@ import { DefaultRelays, EmailRegex } from "Const";
|
||||
import { bech32ToHex, unwrap } from "Util";
|
||||
import { HexKey } from "Nostr";
|
||||
import ZapButton from "Element/ZapButton";
|
||||
import useImgProxy from "Feed/ImgProxy";
|
||||
// import useImgProxy from "Feed/ImgProxy";
|
||||
|
||||
interface ArtworkEntry {
|
||||
name: string;
|
||||
@ -51,7 +51,7 @@ export default function LoginPage() {
|
||||
const [key, setKey] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
const [art, setArt] = useState<ArtworkEntry>();
|
||||
const { proxy } = useImgProxy();
|
||||
// const { proxy } = useImgProxy();
|
||||
|
||||
useEffect(() => {
|
||||
if (publicKey) {
|
||||
|
@ -278,7 +278,7 @@ export default function ProfilePage() {
|
||||
}
|
||||
|
||||
function renderTab(v: Tab) {
|
||||
return <TabElement t={v} tab={tab} setTab={setTab} />;
|
||||
return <TabElement key={v.value} t={v} tab={tab} setTab={setTab} />;
|
||||
}
|
||||
|
||||
const w = window.document.querySelector(".page")?.clientWidth;
|
||||
@ -293,6 +293,7 @@ export default function ProfilePage() {
|
||||
</div>
|
||||
<div className="tabs main-content" ref={horizontalScroll}>
|
||||
{[ProfileTab.Notes, ProfileTab.Followers, ProfileTab.Follows, ProfileTab.Muted].map(renderTab)}
|
||||
|
||||
{optionalTabs.map(renderTab)}
|
||||
{isMe && renderTab(ProfileTab.Blocked)}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user