This commit is contained in:
2026-01-23 20:35:40 +03:00
parent cf3b0e48ec
commit 66c151653e
137 changed files with 41495 additions and 0 deletions

22
app/routes/_index.tsx Normal file
View File

@@ -0,0 +1,22 @@
import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { getUserId } from "~/lib/auth.server";
export const meta: MetaFunction = () => {
return [
{ title: "نظام إدارة صيانة السيارات" },
{ name: "description", content: "نظام شامل لإدارة صيانة السيارات" },
];
};
export async function loader({ request }: LoaderFunctionArgs) {
const userId = await getUserId(request);
if (userId) {
// User is authenticated, redirect to dashboard
return redirect("/dashboard");
} else {
// User is not authenticated, redirect to signin
return redirect("/signin");
}
}