Skip to content

Commit

Permalink
Merge pull request #207 from aesirxio/develop
Browse files Browse the repository at this point in the history
Format code
  • Loading branch information
lunguyenhat authored Feb 16, 2023
2 parents 2dfe49c + bf3b23c commit 72f325f
Show file tree
Hide file tree
Showing 33 changed files with 328 additions and 310 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Format

on:
pull_request:

jobs:
code:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install dependencies
run: yarn install

- name: Run Prettier
run: yarn run format:check
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
"dev": "react-scripts start",
"lint": "eslint --fix \"src/**/\"",
"lint:check": "eslint \"src/**/\"",
"lint:nowarns": "eslint --quiet \"src/**/\""
"lint:nowarns": "eslint --quiet \"src/**/\"",
"format:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'",
"format:write": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'"
},
"eslintConfig": {
"extends": [
Expand Down Expand Up @@ -93,6 +95,7 @@
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"eslint": "^8.17",
"prettier": "^2.8.4",
"react-scripts": "^5.0.1",
"sass": "^1.52",
"serve": "^13.0.2"
Expand Down
3 changes: 1 addition & 2 deletions src/components/ButtonCancel/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { withTranslation } from 'react-i18next';


class ButtonCancel extends React.Component {
render() {
const {t}= this.props;
const { t } = this.props;
return (
<>
<div>
Expand Down
1 change: 0 additions & 1 deletion src/components/ButtonConnect/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import React from 'react';

const ButtonConnect = ({ onClick, isConnected, disabled = false }) => {

return disabled ? (
<div>Coming soon!</div>
) : (
Expand Down
62 changes: 31 additions & 31 deletions src/components/Chart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
* @license GNU General Public License version 3, see LICENSE.
*/

import React from "react";
import Chart from "react-google-charts";
import React from 'react';
import Chart from 'react-google-charts';

const data = [
["", "Comments", "Followers", "Posts", "Engagement"],
["Facebook", 1000, 400, 200, 100],
["Facebook Ads", 1000, 400, 200, 100],
["Youtube", 1170, 460, 250, 800],
["Joomla", 660, 1120, 300, 700],
["Twitter", 1030, 540, 350, 50],
["Pinterest", 1030, 540, 350, 2000],
["Instagram", 1030, 540, 350, 1200],
["Linkedin", 1030, 540, 350, 600],
['', 'Comments', 'Followers', 'Posts', 'Engagement'],
['Facebook', 1000, 400, 200, 100],
['Facebook Ads', 1000, 400, 200, 100],
['Youtube', 1170, 460, 250, 800],
['Joomla', 660, 1120, 300, 700],
['Twitter', 1030, 540, 350, 50],
['Pinterest', 1030, 540, 350, 2000],
['Instagram', 1030, 540, 350, 1200],
['Linkedin', 1030, 540, 350, 600],
];

const colorsLine = ["#4791FF", "#FFD950", "#02BC77", "#FF2366"];
const colorsLine = ['#4791FF', '#FFD950', '#02BC77', '#FF2366'];

class ComponentChart extends React.Component {
constructor(props) {
Expand All @@ -38,51 +38,51 @@ class ComponentChart extends React.Component {

<div className="p-3">
<Chart
width={"100%"}
height={"340px"}
width={'100%'}
height={'340px'}
chartType="ColumnChart"
loader={<div>Loading Chart</div>}
data={data}
options={{
chartArea: {
width: "92%",
width: '92%',
right: 0,
},
color: "red",
color: 'red',
legend: {
position: "bottom",
position: 'bottom',
textStyle: {
color: "#081240",
fontName: "SVN-Sofia Pro",
borderRadius: "20px",
color: '#081240',
fontName: 'SVN-Sofia Pro',
borderRadius: '20px',
},
},
colors: colorsLine,
vAxis: {
textStyle: {
color: "#081240",
fontName: "SVN-Sofia Pro",
color: '#081240',
fontName: 'SVN-Sofia Pro',
},
baselineColor: "#EFEFEF",
baselineColor: '#EFEFEF',
gridlines: {
color: "#EFEFEF",
zeroLineColor: "#EFEFEF",
color: '#EFEFEF',
zeroLineColor: '#EFEFEF',
},
},
hAxis: {
textStyle: {
fontSize: 12,
fontName: "SVN-Sofia Pro",
color: "#081240",
fontName: 'SVN-Sofia Pro',
color: '#081240',
},
baselineColor: "#EFEFEF",
baselineColor: '#EFEFEF',
gridlines: {
color: "#EFEFEF",
zeroLineColor: "#EFEFEF",
color: '#EFEFEF',
zeroLineColor: '#EFEFEF',
},
},
}}
rootProps={{ "data-testid": "2" }}
rootProps={{ 'data-testid': '2' }}
/>
</div>
</div>
Expand Down
11 changes: 4 additions & 7 deletions src/components/Complete/ItemComplete/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* @license GNU General Public License version 3, see LICENSE.
*/

import React from "react";
import { ProgressBar } from "react-bootstrap";
import React from 'react';
import { ProgressBar } from 'react-bootstrap';

import "../index.scss";
import '../index.scss';

class ItemComplete extends React.Component {
constructor(props) {
Expand All @@ -25,10 +25,7 @@ class ItemComplete extends React.Component {
<ul className="list-unstyled d-flex align-items-center mb-0 flex-wrap">
{value.complete.map((item, index) => {
return (
<li
key={index}
className="col-4 fs-12 d-flex align-items-center"
>
<li key={index} className="col-4 fs-12 d-flex align-items-center">
<span
className={`
number_progre
Expand Down
Loading

0 comments on commit 72f325f

Please sign in to comment.