diff --git a/data/Generator/templates/react-app/src/_Page.js b/data/Generator/templates/react-app/src/_Page.js index 8a508c339..19980e31b 100644 --- a/data/Generator/templates/react-app/src/_Page.js +++ b/data/Generator/templates/react-app/src/_Page.js @@ -10,18 +10,14 @@ import {= what =} from "{= from =}" import * as {= entityLowerName =}State from '{= entityStatePath =}' import * as {= entityLowerName =}Actions from '{= entityActionsPath =}' import {= entity.name =} from '{= entityClassPath =}' - -{=! Imports of entity create forms =} {=# entityCreateForms =} import {= entityForm.name =} from '{= path =}' {=/ entityCreateForms =} - -{=! Imports of entity lists =} {=# entityLists =} import {= entityList.name =} from '{= path =}' {=/ entityLists =} - {=/ entities =} + {=# pageStylePath =} import '{= pageStylePath =}' {=/ pageStylePath =} diff --git a/src/Generator/PageGenerator.hs b/src/Generator/PageGenerator.hs index b47547b81..46e13f017 100644 --- a/src/Generator/PageGenerator.hs +++ b/src/Generator/PageGenerator.hs @@ -109,7 +109,7 @@ relPathFromPageToSrc = Path.reversePath pageDirPathInSrc -- NOTE: Here we return FilePath instead of Path because we need stuff like "./" or "../" in the path, -- which Path would normalize away. buildImportPathFromPathInSrc :: Path.Path Path.Rel a -> FilePath -buildImportPathFromPathInSrc pathInSrc = "." FP. relPathFromPageToSrc FP. (Path.toFilePath pathInSrc) +buildImportPathFromPathInSrc pathInSrc = relPathFromPageToSrc FP. (Path.toFilePath pathInSrc) -- Returns file draft(s) that need to be created (if any) + -- file path via which to import the style (relative to generated src dir).