feat: datasource
This commit is contained in:
@@ -18,17 +18,18 @@ import { bindSchedulesApi } from "../features/schedules/state/schedulesStore";
|
||||
|
||||
import "../styles/platform.css";
|
||||
|
||||
type ActivePage = "home" | "scripts" | "schedules" | "system";
|
||||
type ActivePage = "home" | "scripts" | "data-resources" | "schedules" | "system";
|
||||
|
||||
function pageFromPath(pathname: string): ActivePage {
|
||||
const page = pathname.replace(/^\/+|\/+$/g, "");
|
||||
return ["scripts", "schedules", "system"].includes(page)
|
||||
return ["scripts", "data-resources", "schedules", "system"].includes(page)
|
||||
? (page as ActivePage)
|
||||
: "home";
|
||||
}
|
||||
|
||||
function pathForPage(page: ActivePage): string {
|
||||
return page === "home" ? "/workbench" : `/${page}`;
|
||||
if (page === "home") return "/workbench";
|
||||
return `/${page}`;
|
||||
}
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
@@ -137,4 +138,4 @@ function AuthenticatedLayout() {
|
||||
<Toast toast={toast} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user