fixed
This commit is contained in:
parent
cf60ead52c
commit
ec92000f2d
|
|
@ -3,8 +3,18 @@ import { requireChains } from "@/entities/chain/lib";
|
|||
import { useChainState } from "@/entities/chain/model";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
import { Typography } from "@mui/material";
|
||||
|
||||
function IndexPage() {
|
||||
return <div className="mt-8">content</div>;
|
||||
return (
|
||||
<Typography
|
||||
variant="h4"
|
||||
sx={{ color: "#4C4E64DE" }}
|
||||
className="select-none"
|
||||
>
|
||||
Создайте цепочку
|
||||
</Typography>
|
||||
);
|
||||
}
|
||||
|
||||
export const Route = createFileRoute("/$namespace/")({
|
||||
|
|
@ -13,13 +23,12 @@ export const Route = createFileRoute("/$namespace/")({
|
|||
await requireChains();
|
||||
const chains = useChainState.getState().chains;
|
||||
|
||||
if (typeof chains === "undefined" || !chains[0]._id)
|
||||
throw redirect({ to: "/" });
|
||||
if (typeof chains === "undefined") throw redirect({ to: "/" });
|
||||
|
||||
if (chains.length > 0)
|
||||
if (chains[0]?._id)
|
||||
throw redirect({
|
||||
to: "/$namespace/$chainId",
|
||||
params: { namespace: params.namespace, chainId: chains[0]._id },
|
||||
params: { namespace: params.namespace, chainId: chains[0]!._id },
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user