add todos

This commit is contained in:
Roman Pominov committed 2022-09-15 15:23:10 +03:00
1 parent eb96fa061a
commit b733b92365
4 files changed
+7

No files matched your search

+3
View File
@@ -37,6 +37,9 @@ export const loader: LoaderFunction = async ({
if (prodBuild === undefined) {
throw new Error(`Site is not published`);
}
// @todo: use a correct page rather than homePage
const [tree, props, breakpoints] = await Promise.all([
db.tree.loadById(prodBuild.pages.homePage.treeId),
db.props.loadByTreeId(prodBuild.pages.homePage.treeId),
@@ -20,6 +20,8 @@ export const loader: LoaderFunction = async ({
`Project ${params.projectId} needs to be published first`
);
}
// @todo: use a correct page rather than homePage
return await db.props.loadByTreeId(prodBuild.pages.homePage.treeId);
} catch (error) {
if (error instanceof Error) {
@@ -21,6 +21,7 @@ export const loader: LoaderFunction = async ({
);
}
// @todo: use a correct page rather than homePage
return await db.tree.loadById(prodBuild.pages.homePage.treeId);
} catch (error) {
if (error instanceof Error) {
@@ -15,6 +15,7 @@ const loadData = async (projectId: Project["id"]) => {
const devBuild = await db.build.loadByProjectId(projectId, "dev");
// @todo: use a correct page rather than homePage
const [tree, props, breakpoints] = await Promise.all([
db.tree.loadById(devBuild.pages.homePage.treeId),
db.props.loadByTreeId(devBuild.pages.homePage.treeId),