Tourism Dashboard
✈️ dashboard tourism for Neo4Tourism framework
🗃️ Documentation
Here you will find explanations of the global functions and components(props, what it's for,...).
🛣️ Add new routes
Go to server.js
file and add this in app.prepare()
function:
server.get("/add/new/route/:id", (req, res) => {
const actualPage = "/test";
const queryParams = { id: req.params.id };
app.render(req, res, actualPage, queryParams);
});
This will redirect all query with this URL to the pages/test.js
page.
If you want to access it via the navigation bar, modify the menu
constant nav.js
component:
const menu = [...{ href: "/add/new/route/1548", label: "New Route", icon: "" }];
🌍 Translation
Write all necessary translations into a file under locales/{en,fr}
directory.
Add withTranslation module if you want to use i18n in component or page:
import { withTranslation } from "relative/path/to/i18n";
In the getInitialProps()
function returns namespace(s) you want to use and export the class with the i18n module:
// In the getInitialProps()
return { namespacesRequired: ["test"] };
// Export the class
export default withTranslation(["test"])(YourClass);
Then you can use translation available in your previous edited/created file:
<h1> {this.props.t("test-translation")} </h1>
💄 Customize colors
All the colors variables for departments, countries or cities are available in the utils/colors.js
file.
📱 Responsive
Smartphone | iPad |
---|---|