Skip to content

Commit

Permalink
chore: prefetch lcp image
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Nov 30, 2023
1 parent 6dc9926 commit 1d188c1
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions apps/marginfi-v2-ui/src/components/common/PageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FC, ReactNode } from "react";
import Head from "next/head";
import { useUiStore } from "~/store";
import { WalletButton } from "./Wallet";
import { Mobile } from "~/mediaQueries";
Expand All @@ -12,23 +13,28 @@ const PageHeader: FC<PageHeaderProps> = ({ children }) => {
const [isFetchingData] = useUiStore((state) => [state.isFetchingData]);

return (
<div className="flex w-full h-[90px] sm:h-[60px] justify-center items-center border-y bg-[url('/WaveBG3.png')]">
<div className="w-full xl:w-4/5 px-4 xl:max-w-7xl flex flex-row justify-between items-center border-solid font-aeonik font-normal text-2xl sm:text-3xl">
<div className="flex gap-4 justify-center items-center">
<>
<Head>
<link rel="preload" as="image" href="/WaveBG3.png" type="image/png" />
</Head>
<div className="flex w-full h-[90px] sm:h-[60px] justify-center items-center border-y bg-[url('/WaveBG3.png')]">
<div className="w-full xl:w-4/5 px-4 xl:max-w-7xl flex flex-row justify-between items-center border-solid font-aeonik font-normal text-2xl sm:text-3xl">
<div className="flex gap-4 justify-center items-center">
<Mobile>
<div className="ml-[4px]">
<IconMrgn size={18} className={`${isFetchingData ? "animate-pulse" : ""}`} />
</div>
</Mobile>
<div>{children}</div>
</div>
<Mobile>
<div className="ml-[4px]">
<IconMrgn size={18} className={`${isFetchingData ? "animate-pulse" : ""}`} />
<div className="flex justify-center items-center gap-3">
<WalletButton />
</div>
</Mobile>
<div>{children}</div>
</div>
<Mobile>
<div className="flex justify-center items-center gap-3">
<WalletButton />
</div>
</Mobile>
</div>
</div>
</>
);
};

Expand Down

2 comments on commit 1d188c1

@vercel
Copy link

@vercel vercel bot commented on 1d188c1 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

omni – ./apps/omni

omni-mrgn.vercel.app
omni-one.vercel.app
omni.marginfi.com
omni-git-production-mrgn.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 1d188c1 Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.