Skip to content

Commit

Permalink
Improve network switches on singular deploy (MystenLabs#6019)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Mysten authored Nov 10, 2022
1 parent 2412051 commit ea8528c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion apps/explorer/scripts/vercel-ignored-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ const requiresBuild = () => {
process.exit(1);
};

const ref =
process.env.VERCEL === '1' && process.env.VERCEL_GIT_PREVIOUS_SHA
? process.env.VERCEL_GIT_PREVIOUS_SHA
: 'HEAD^';

async function main() {
const { stdout, stderr } = await execFile('pnpm', [
'list',
'--filter',
'...[origin/main]',
`...[${ref}]`,
'--depth',
'-1',
'--json',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ export function LatestTxCard({
const handlePageChange = useCallback(
(newPage: number) => {
setPageIndex(newPage);
setSearchParams({ p: newPage.toString() });
const newSearchParams = new URLSearchParams(searchParams);
newSearchParams.set('p', newPage.toString());
setSearchParams(newSearchParams);
},
[setSearchParams]
[searchParams, setSearchParams]
);

const countQuery = useQuery(
Expand Down

0 comments on commit ea8528c

Please sign in to comment.