flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/apps/web/app/routes/repo/code.tsx

13 lines532 bytesCodeBlame
1import type { Route } from "./+types/code";
2import { TreeView } from "../../components/repo-view";
3import { repos } from "../../lib/services.server";
4import { getViewer, unwrap } from "../../lib/session.server";
5
6export async function loader({ params, context }: Route.LoaderArgs) {
7 const path = { namespace: params.owner, name: params.repo };
8 return unwrap(await repos.tree(path, getViewer(context), null, ""));
9}
10
11export default function Code({ loaderData }: Route.ComponentProps) {
12 return <TreeView tree={loaderData} />;
13}