Compare commits

..

No commits in common. "292b8b2f21e5227084714e9980781601a6e1a0df" and "467c29c82c27910d5b8f870efe477cd85698f8bd" have entirely different histories.

6 changed files with 20047 additions and 66 deletions

View File

@ -1,8 +0,0 @@
{
"bracketSpacing": true,
"bracketSameLine": true,
"quoteProps": "consistent",
"semi": true,
"singleQuote": false,
"trailingComma": "all"
}

View File

@ -3,8 +3,7 @@ import type {
AuthActionResponse,
CheckResponse,
OnErrorResponse
// @ts-ignore
} from "@refinedev/core/dist/interfaces/bindings/auth"
} from "@refinedev/core/dist/interfaces"
export const authProvider: AuthProvider = {
login: async (params: any) => {

View File

@ -11,41 +11,31 @@ import type { LinksFunction } from "@remix-run/node";
// Supports weights 200-800
import '@fontsource-variable/manrope';
import {Refine} from "@refinedev/core";
import {authProvider} from "~/data/auth-provider.js";
import routerProvider from "@refinedev/remix-router";
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: stylesheet },
];
export function Layout({children}: { children: React.ReactNode }) {
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<Meta/>
<Links/>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
{children}
<ScrollRestoration/>
<Scripts/>
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
export default function App() {
return (
<Refine
authProvider={authProvider}
routerProvider={routerProvider}
>
<Outlet/>
</Refine>
);
return <Outlet />;
}
export function HydrateFallback() {

View File

@ -1,25 +1,13 @@
import Login from "./login";
import { useGo, useIsAuthenticated } from "@refinedev/core";
import { useEffect } from "react";
import Login from "./login"
export default function Index() {
const { isLoading, data } = useIsAuthenticated();
const isLogged = false
const go = useGo();
useEffect(() => {
if (!isLoading && data?.authenticated) {
go({ to: "/dashboard", type: "replace" });
}
}, [isLoading, data]);
if (isLoading) {
return <>Checking Login Status</> || null;
if (isLogged) {
window.location.href = "/dashboard"
} else {
window.location.href = "/login"
}
if (data?.authenticated) {
return <>Redirecting</> || null;
}
return <Login />;
return isLogged ? <div>Dashboard</div> : <Login />
}

20014
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -24,10 +24,8 @@
"@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@refinedev/cli": "^2.16.1",
"@refinedev/core": "https://gitpkg.now.sh/LumeWeb/refine/packages/core?remix",
"@refinedev/devtools-internal": "https://gitpkg.now.sh/LumeWeb/refine/packages/devtools-internal?remix",
"@refinedev/devtools-shared": "https://gitpkg.now.sh/LumeWeb/refine/packages/devtools-shared?remix",
"@refinedev/remix-router": "https://gitpkg.now.sh/LumeWeb/refine/packages/remix?remix",
"@refinedev/core": "^4.47.2",
"@refinedev/remix-router": "^3.0.0",
"@remix-run/node": "^2.8.0",
"@remix-run/react": "^2.8.0",
"@tanstack/react-table": "^8.13.2",