Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-justin committed Jan 24, 2025
1 parent fa58ba8 commit 812925a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/.server/registrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
} from "@better-giving/registration/db";
import { tables } from "@better-giving/types/list";
import { ap } from "./aws/ap";
import { env } from "./env";

const env = "production";
export async function getRegs(params: QueryParams): Promise<Page> {
const { startDate = minDate, endDate = maxDate, status = "02" } = params;
const skStart: Regs["gsi2SK"] = `${status ?? "02"}#${startDate}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "@remix-run/react";
import { NavLink } from "@remix-run/react";
import { useCachedLoaderData } from "api/cache";
import { Info } from "components/Status";
import { Plus } from "lucide-react";
Expand All @@ -15,10 +15,10 @@ export default function PayoutMethods() {
<div>
<div className="flex items-center justify-between mb-4">
<h1 className="text-left text-lg uppercase">Current Banking Details</h1>
<Link to="new" className="btn-green pl-2 pr-4 py-2 text-xs">
<NavLink to="new" className="btn-green pl-2 pr-4 py-2 text-xs">
<Plus className="mr-2" size={16} />
<span>New</span>
</Link>
</NavLink>
</div>

{methods.length === 0 ? (
Expand Down
6 changes: 5 additions & 1 deletion src/pages/BankingApplications/BankingApplications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export default function BankingApplications() {
});
const [items, setItems] = useState(firstPage.items);

useEffect(() => {
setItems(firstPage.items);
}, [firstPage.items]);

useEffect(() => {
if (state === "loading" || !data) return;
setItems((prev) => [...prev, ...data.items]);
Expand All @@ -23,7 +27,7 @@ export default function BankingApplications() {
function loadNextPage(key: string) {
const copy = new URLSearchParams(params);
copy.set("nextPageKey", key);
load(`?index&${copy.toString()}`);
load(`?${copy.toString()}`);
}

return (
Expand Down

0 comments on commit 812925a

Please sign in to comment.