You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The longer object definitions in config.js could perhaps be separated into new files (e.g. PAGES into pages.js and PHOTO_FIELDS into photo_fields.js to make it easier to read.
This would be similar to behaviour elsewhere in the config.js file for example importing from categories.js and strings.js.
These configuration files could be kept in a subfolder, e.g. custom/configurations.
The text was updated successfully, but these errors were encountered:
Additionally, it would mean all of the following code could be moved out of config.js and into custom/configurations/pages.js
import React from "react";
import AccountCircleIcon from "@material-ui/icons/AccountCircle";
import CheckCircleIcon from "@material-ui/icons/CheckCircle";
import PhotoAlbumIcon from "@material-ui/icons/PhotoAlbum";
import SchoolIcon from "@material-ui/icons/School";
import DashboardIcon from "@material-ui/icons/Dashboard";
import HelpIcon from "@material-ui/icons/Help";
import FeedbackIcon from "@material-ui/icons/Feedback";
import LibraryBooksIcon from "@material-ui/icons/LibraryBooks";
import { CUSTOM_STRING } from "./configurations/strings.js";
import { PAGES } from './configurations/pages.js'
import { PHOTO_FIELDS } from './configurations/photo_fields.js'
Reduced up config.js from over 200 lines of code to around 60. This separation of concerns makes it much easier to read, understand and configure imo. Happy to PR.
The longer object definitions in
config.js
could perhaps be separated into new files (e.g. PAGES intopages.js
and PHOTO_FIELDS intophoto_fields.js
to make it easier to read.This would be similar to behaviour elsewhere in the
config.js
file for example importing fromcategories.js
andstrings.js
.These configuration files could be kept in a subfolder, e.g. custom/configurations.
The text was updated successfully, but these errors were encountered: