import { createFileRoute } from "@tanstack/react-router";
import { AddCards } from "./-components/dashboard/AddCards";
import DashBoard from "./-components/dashboard/Dashboard";
import { useCardStore } from "./-lib/store/useCardStore";

export const Route = createFileRoute("/_old/old/")({
	component: RouteComponent,
});

function RouteComponent() {
	const { cards } = useCardStore();
	return (
		<div>
			{cards.length > 0 ? (
				<DashBoard />
			) : (
				<div className="m-3">
					<span>
						Looks like you have no cards added try clicking adding some
					</span>{" "}
					<AddCards />
				</div>
			)}
		</div>
	);
}
