Skip to content

Commit

Permalink
fix: address linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: tylerslaton <[email protected]>
  • Loading branch information
tylerslaton committed Oct 16, 2024
1 parent 071234d commit e68fa0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/admin/app/components/signin/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SignIn: React.FC<SignInProps> = ({ className }) => {
</CardHeader>
<CardFooter className="border-t pt-4">
<Button
variant="destructive"
variant="secondary"
className="w-full"
onClick={() => {
window.location.href = "/oauth2/start?rd=/admin/";
Expand Down
4 changes: 4 additions & 0 deletions ui/admin/app/routes/_auth.agents.$agent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export const clientLoader = async ({
const { threadId, from } =
parseQueryParams(request.url, paramSchema).data || {};

if (!agentId) {
throw redirect("/agents");
}

// preload the agent
const agent = await AgentService.getAgentById(agentId).catch(noop);

Expand Down
4 changes: 4 additions & 0 deletions ui/admin/app/routes/_auth.thread.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ import {
export const clientLoader = async ({ params }: ClientLoaderFunctionArgs) => {
const { id } = $params("/thread/:id", params);

if (!id) {
throw redirect("/threads");
}

const thread = await ThreadsService.getThreadById(id);
if (!thread) throw redirect("/threads");

Expand Down

0 comments on commit e68fa0d

Please sign in to comment.