To completely remove firebase from the app just follow the steps given below :-
1. Open the src folder and delete the firebase directory from it.
2. Go to the src folder and open App.js file and delete the import './firebase'; statement.
3. Go to the src->actions folder and delete the AuthActions.js file and also remove import file statement of this file from the index.js file.
4. Remove Signin and Signup methods from the Signin and Signup pages. To remove them Go to src->container and Open SigninFirebase.js and SignupFirebase.js files.
After removing the actions you also need to remove the signin and signup buttons from the Signin and Signup pages.
5. Uninstall the firebase dependency. To uninstall the firebase run the command in your project directory.
npm uninstall --save firebase
That's It, The above steps will completely remove the firebase from your project.
Where can I find the fonts and icons?
We have used material design iconic font icons in the template. To get this font icons refer to it's official documentation.
For fonts, we have used Heebo font in the template. We have integrated this font by google fonts. To get this font refer to it's official documentation.
How to add link in Product Reports Widget?
Here are the step by step instructions to add link in Product Reports Widget.
1. Go to src->components->Widgets and edit the ProductReports.js file.
Import the Link component from the react-router-dom.
Add the component and to attribute in the IconButton element.
ProductReports.js
/** * Product Report Widget */import React, { Component } from'react';...// import the Link component from the react-router-domimport { Link } from"react-router-dom";classProductReportsWidgetextendsComponent {...render() {const { products } =this.state;return ( <ScrollbarsclassName="rct-scroll"autoHeightautoHeightMin={100} autoHeightMax={410} autoHide> <ulclassName="list-group"> {products &&products.map((product, key) => ( <liclassName="list-group-item d-flex justify-content-between border-0"key={key}> ... <IconButtoncolor="primary"className="import-report"component={Link} // add the component propsto={product.link} // add the to props to this component > <iclassName="ti-import"></i> </IconButton> </li> ))} </ul> </Scrollbars> ); }}exportdefault ProductReportsWidget;
2 . Update the data file. Add the link for each products e.g.,
[ {"id":1,"name":"Event Promo","photoUrl":"http://reactify.theironnetwork.org/data/images/icon1.png","date":"10 Jun - 10 Jul","link":"http://reactify.theironnetwork.org/product1" }, {"id":2,"name":"Toon City","photoUrl":"http://reactify.theironnetwork.org/data/images/icon2.png","date":"10 Jun - 10 Jul","link":"http://reactify.theironnetwork.org/product2" }, {"id":3,"name":"Chanya Theme","photoUrl":"http://reactify.theironnetwork.org/data/images/icon3.png","date":"10 Jun - 10 Jul","link":"http://reactify.theironnetwork.org/product3" }, {"id":4,"name":"Gene Theme","photoUrl":"http://reactify.theironnetwork.org/data/images/icon4.png","date":"10 Jun - 10 Jul","link":"http://reactify.theironnetwork.org/product4" }, {"id":5,"name":"Adminify Theme","photoUrl":"http://reactify.theironnetwork.org/data/images/icon5.png","date":"10 Jun - 10 Jul","link":"http://reactify.theironnetwork.org/product5" }, {"id":6,"name":"Beast Theme","photoUrl":"http://reactify.theironnetwork.org/data/images/icon6.png","date":"10 Jun - 10 Jul","link":"http://reactify.theironnetwork.org/product6" }]
How to use Campaign Performance Widget?
Here are the some instructions to use CampaignPerformance widget:-
There are two variation of the chart i.e.,
- static or single data.
- dynamic chart with animation to show multiple campaign.
Static or single data
In this option chart display only a single campaign data, like if you want to show last 5 days campaign then you need to follow the given below steps
- Define the data with the key last5Days note this key will be used as to analyze what data will display on chart as default.
- Set the default data
That's it this will show the last5Days data.
Dynamic chart with animation to show multiple campaign.
In this option chart display the multiple campaigns data randomly with the animation, like in our demo. Follow the given below steps to make dynamic chart.
1. Define data for each key of the campaign, we have taken an example of four campaign data as in the screenshot:
2. - Set the default data as in did in the static or single data. Note the selected data will be depend upon the campaigns data keys.
3. Update the select list.
How to build an app from scratch?
You can easily build your app from scratch just follow these steps :
Copy the seed project from downloaded themeforest files.
Open terminal and go to the seed directory and then run npm install.
By default seed project contains dashboard page means you can easily build your dashboard.
If you want to integrate Todo List in you dashboard then you need to follow these steps:-
Open src/routes/dashboard/index.js
Copy TodoList widget from reactify/src/components/Widgets/TodoList.js themeforest downloded file and paste it into under the your-project-directory-name/src/components/Widgets/ directory.
Import TodoList widget from src/components/TodoList.js
index.js
/*** Dashboard Page*/import React, { Component } from'react';import { TodoList } from'Components/Widgets';// page title barimport PageTitleBar from'Components/PageTitleBar/PageTitleBar';// localize messagesimport IntlMessages from'Util/IntlMessages';// collapsible card component use if you want to make todo list collapsibleimport RctCollapsibleCard from'Components/RctCollapsibleCard/RctCollapsibleCard';classDashboardextendsComponent {render() {return ( <divclassName="dashboard-wrapper"> <PageTitleBartitle={<IntlMessagesid="sidebar.dashboard" />} match={this.props.match} /> <divclassName="row"> <RctCollapsibleCardcustomClasses="to-do-list"colClasses="col-sm-6 col-md-4 col-lg-4 d-xs-half-block d-xxs-full"collapsiblereloadablecloseablefullBlock > <ToDoListWidget /> </RctCollapsibleCard> </div> </div> ); }}exportdefault Dashboard;
Save the file and open your browser you will see your dashboard is ready.
If you want to integrate User Management page in your app then you need to follow these steps:-
Copy the user management page from reactify/src/routes/users/user-management downloaded themeforest files and paste it into under the your-app-directory/src/routes/ directory.
Now you need to define the route in the your-app-directory/src/services/_routerService.js file.
How to integrate reactify components in existing app?
By following these steps you can easily use reactify components in your existing app.
First of all you need to check your app dependencies and also you need to install all reactify dependencies in package.json
By following this step your existing styles may be overridden. You need to follow this step carefully.
Copy the styles from reactify/src/assets/scss and paste where your app style is exist.
If you want to use reactify components see faq How to build an app from scratch? skip the five lines and start building your app.
How to integrate Api's in reactify?
Reactify comes with Api's ready means you can easily integrate api's and connect with the back-end server as well. Follow these steps to integrate api's:-
Change your back-end base url under the reactify/src/api/index.js file.
...componentDidMount() {this.getTodo();}getTodo() {this.setState({ sectionReload:true });axios.get('https://jsonplaceholder.typicode.com/todos') // your api url will be here.then((response) => {this.setState({ todoListData:response.data, sectionReload:false }); }).catch(error => {console.log(error);this.setState({ sectionReload:false }) })}
Some components data are defined in data.jse.g. insrc/routes/dashboard/dashboard-v1/data.js file there are some components data are declared you may also change their data from this file.
How to change the color on the template ?
Here are step by step instructions to change the color on the template.
Case1: Change Primary Color:
In order to change the primary color you need to following steps:
Go to AppConfig file and then to themeColors, simply change the primary value as per your requirement.
Following the above two steps the primary color should be changed to your desired color.
Case2: Change Theme Color:
Reactify comes with 6 predefined themes that you can use, you can also see them in action from demo under themeoption on right hand side. Incase you want any one of them, then you simply need to change the class on body to your desired class for e.g theme-primary, theme-warning, theme-danger etc. In case you want to give your own custom class then you can go to container -> themes and create your own file. You can follow the same structure as other files present there. In addition to this you need go to src/assets/scss/custom/themes and create the necessary sass file.
How to use typescript(.ts) code in reactify?
Following steps to add typescript in react app :-
Step 1. install these modules npm install --save typescript @types/node @types/react @types/react-d
om @types/jest
Step 2. npm install --save ts-loader and react-scripts
Step 3. Add some changes in webConfig file as follow below :-
Step 5. Create A component name test.tsx and add this code in file
test.tsx
import*as React from'react';exportdefaultclassTestextendsReact.Component<any,any> {publicrender() {return ( <h2> Here is the integration of typescript</h2> ); } }
Step 6. Import component in another file ,add on blank page component like this:-
Why Laraval version does not watch the files and also not loading after files changes.
In react other versions , changes automatically reflect by reloading the browser but in laraval Each time when you made changes in the project files then you need to execute npm run dev command. It will compiles the all project files and bundled into a single or chunks files. If you not execute the npm run dev command the changes will not reflect.
How can i use sidebar and horizontal menu at same time.
a). Go to src > components > RctAppLayout and open index file and find following code
{this.renderPage()}
and add horizontal menu like this.
<HorizontalMenu /> // add this component {this.renderPage()}
b) Now import this component to same file in component comment section.
import HorizontalMenu from 'Components/HorizontalMenu/HorizontalMenu';
c) Go to src->components->HorizontalMenu & open the NavLinks.js file.
d) Search for the "path": "/horizontal/... & just replace the horizontal keyword with app keyword.
By these steps you will integrated both menus.
How to integrate Reactify with Laravel?
Whether you need to integrate the laravel in reactify-redux-saga or in reactify-redux-thunk, the steps remains the same.
Note: You need to open the reactify, reactify-laravel(package that we provide) and your laravel project.
Step 1: Replace the contents of webpack.mix.js file of laravel project with the following code snippet:
webpack.mix.js
constmix=require('laravel-mix');/* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */mix.autoload({'jquery': ['$','window.jQuery','jQuery'],})mix.webpackConfig({ resolve: { alias: {'Actions':path.resolve(__dirname,'resources/js/actions/'),'Components':path.resolve(__dirname,'resources/js/components/'),'Assets':path.resolve(__dirname,'resources/js/assets/'),'Util':path.resolve(__dirname,'resources/js/util/'),'Routes':path.resolve(__dirname,'resources/js/routes/'),'Constants':path.resolve(__dirname,'resources/js/constants/'),'Helpers':path.resolve(__dirname,'resources/js/helpers/'),'Api':path.resolve(__dirname,'resources/js/api/') } }, output: { chunkFilename:'js/chunks/[name].js', }}); mix.js('resources/js/index.js','public/js').sass('resources/sass/app.scss','public/css');
Step 2: Open the reactify-laravel project that we have given to you and copy all the contents of package.json file and replace the contents of Laravel's project package.jsonfile with the contents copied.
Step 3: Create a file .babelrc in your project directory (projectName/.babelrc) and put the following code in the file:
Step 4: In your laravel project, Open the resources->js folder and delete the component folder and app.js file.
Step 5: Now go to your reactify project src folder and copy all the folders & files and paste it inside your laravel's project resources->js folder.
Step 6: Now open the index.js file from your laravel's project resources->js folder and add the line require('./bootstrap'); after the first 2 lines of the code. Like in the code given below:
index.js
import React from'react';import ReactDOM from'react-dom';jrequire('./bootstrap'); // Added Line
Step 7: Now open the public folder of reactifyproject(that we have provided to you) and copy the favicon and replace it with the favicon inside your laravel's project public folder.
Step 8: Now open the public folder of reactifyproject again and copy the content of index.html file, then open the resources->views->welcome.blade.php file of your laravel's project and replace all the contents with the copied content.
Step 9: In welcome.blade.php file of your laravel's project, you need to update few lines of code. They are: