mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
nits
This commit is contained in:
parent
1283f6487f
commit
957f499584
3 changed files with 16 additions and 9 deletions
|
|
@ -1,8 +1,11 @@
|
|||
"use server";
|
||||
|
||||
import { NavigationMenu } from "../navigationMenu";
|
||||
import { DataTable } from "@/components/ui/data-table";
|
||||
import { columns, RepositoryColumnInfo } from "./columns";
|
||||
import { listRepositories } from "@/lib/server/searchService";
|
||||
import { isServiceError } from "@/lib/utils";
|
||||
import { Suspense } from "react";
|
||||
|
||||
export default async function ReposPage() {
|
||||
const _repos = await listRepositories();
|
||||
|
|
@ -27,17 +30,21 @@ export default async function ReposPage() {
|
|||
indexedFiles: repo.Stats.Documents,
|
||||
commitUrlTemplate: repo.Repository.CommitURLTemplate,
|
||||
}
|
||||
});
|
||||
}).sort((a, b) => {
|
||||
return new Date(b.lastIndexed).getTime() - new Date(a.lastIndexed).getTime();
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="h-screen flex flex-col items-center">
|
||||
<NavigationMenu />
|
||||
<DataTable
|
||||
columns={columns}
|
||||
data={repos}
|
||||
searchKey="name"
|
||||
searchPlaceholder="Search repositories..."
|
||||
/>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<DataTable
|
||||
columns={columns}
|
||||
data={repos}
|
||||
searchKey="name"
|
||||
searchPlaceholder="Search repositories..."
|
||||
/>
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ export const CodePreviewPanel = ({
|
|||
}
|
||||
|
||||
highlightRanges(selectedMatchIndex, ranges, editorRef.current.view);
|
||||
}, [ranges, selectedMatchIndex]);
|
||||
}, [ranges, selectedMatchIndex, file]);
|
||||
|
||||
const onUpClicked = useCallback(() => {
|
||||
onSelectedMatchIndexChange(selectedMatchIndex - 1);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const useThemeNormalized = (defaultTheme: "light" | "dark" = "light") =>
|
|||
}
|
||||
|
||||
return _theme ?? defaultTheme;
|
||||
}, [_theme, systemTheme]);
|
||||
}, [_theme, systemTheme, defaultTheme]);
|
||||
|
||||
return {
|
||||
theme,
|
||||
|
|
|
|||
Loading…
Reference in a new issue