MCPcopy
hub / github.com/triggerdotdev/trigger.dev / PreviousButton

Function PreviousButton

apps/webapp/app/components/ListPagination.tsx:43–62  ·  view source on GitHub ↗
({ cursor }: { cursor?: string })

Source from the content-addressed store, hash-verified

41}
42
43function PreviousButton({ cursor }: { cursor?: string }) {
44 const path = useCursorPath(cursor, "backward");
45
46 return (
47 <LinkButton
48 to={path ?? "#"}
49 variant={"minimal/small"}
50 LeadingIcon="arrow-left"
51 leadingIconClassName="text-text-dimmed"
52 className={cn(
53 "flex items-center",
54 !path &&
55 "cursor-not-allowed opacity-50 group-hover:bg-transparent group-hover:text-text-dimmed"
56 )}
57 onClick={(e) => !path && e.preventDefault()}
58 >
59 Prev
60 </LinkButton>
61 );
62}
63
64function useCursorPath(cursor: string | undefined, direction: Direction) {
65 const location = useLocation();

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useCursorPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…