Skip to content

Commit

Permalink
Display airdrop days remaining without connected wallet (#2616)
Browse files Browse the repository at this point in the history
allow airdrop query to run without address to correctly show days remaining
  • Loading branch information
eli-d authored Apr 10, 2024
1 parent 6487e9b commit 45c189e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,7 @@ const Airdrop = () => {
const isMobile = width < mobileBreakpoint;

const { data: airdropData } = useCache<AirdropLoaderData>(
address
? `/${network}/query/dashboard/airdrop?address=${address}&epoch=${EPOCH_CURRENT_IDENTIFIER}`
: ""
`/${network}/query/dashboard/airdrop?epoch=${EPOCH_CURRENT_IDENTIFIER}&address=${address}`
);

const currentApplication = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export const loader: LoaderFunction = async ({ params, request }) => {
const { network } = params;

const url = new URL(request.url);
const address_ = url.searchParams.get("address");
const address_ = url.searchParams.get("address") ?? "";
const epochIdentifier = url.searchParams.get("epoch") ?? "";

const address = address_?.toLowerCase();

if (!address || !network || !epochIdentifier)
if (!network || !epochIdentifier)
throw new Error("Invalid Request");

const { data, errors } = await useLootboxConfig({
Expand Down

0 comments on commit 45c189e

Please sign in to comment.