Skip to content

Commit 04bd4e0

Browse files
authored
Merge pull request #559 from awibox/development
Replacing tigerspack with material
2 parents b7500d1 + 58eee29 commit 04bd4e0

22 files changed

+777
-433
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node-version: [12.x, 14.x]
10+
node-version: [14.x]
1111
steps:
1212
- uses: actions/checkout@v3
1313
- name: Use Node.js ${{ matrix.node-version }}

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux-app-template",
3-
"version": "1.0.0",
3+
"version": "1.2.0",
44
"description": "The template that will help you quickly start developing your project using React.",
55
"repository": {
66
"type": "git",
@@ -21,6 +21,9 @@
2121
"author": "awibox",
2222
"license": "MIT",
2323
"dependencies": {
24+
"@emotion/react": "^11.10.0",
25+
"@emotion/styled": "^11.10.0",
26+
"@mui/material": "^5.10.0",
2427
"axios": "^0.27.2",
2528
"classnames": "^2.2.6",
2629
"font-awesome": "^4.7.0",
@@ -35,8 +38,7 @@
3538
"react-router-dom": "^5.2.0",
3639
"redux": "^4.2.0",
3740
"redux-thunk": "^2.3.0",
38-
"reselect": "^4.1.6",
39-
"tigerspack": "^0.1.19"
41+
"reselect": "^4.1.6"
4042
},
4143
"devDependencies": {
4244
"@babel/core": "^7.18.10",

src/actions/reposActions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export const getReposSuccess = (repos) => ({
1111
payload: repos,
1212
});
1313

14+
export const clearRepos = () => async (dispatch) => {
15+
dispatch(getError([]));
16+
dispatch(getReposSuccess([]));
17+
};
18+
1419
export const getReposAction = (user) => async (dispatch) => {
1520
try {
1621
const { data } = await trackPromise(axios.get(`${gitHubApiUrl}/${END_POINT}/${user}/repos`));

src/components/AuthorInfo/AuthorInfo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import ImmutablePropTypes from 'react-immutable-proptypes';
44
// Components
5-
import { Button, Card } from 'tigerspack';
5+
import Card from '@mui/material/Card';
6+
import Button from '@mui/material/Button';
67
// Styles
78
import styles from './AuthorInfo.scss';
89

@@ -23,13 +24,13 @@ export default class AuthorInfo extends Component {
2324
render() {
2425
const { author } = this.props;
2526
return (
26-
<Card theme={'light'} className={styles.authorInfo}>
27+
<Card className={styles.authorInfo}>
2728
<div className={styles.logo} style={{ backgroundImage: `url(${author.get('avatar_url')})` }} />
2829
<div className={styles.title}>{author.get('name')}</div>
2930
<div className={styles.titleVersion}>{author.get('location')}</div>
3031
<div className={styles.infoText}>{author.get('bio')}</div>
3132
<div className={styles.button}>
32-
<Button icon={<i className="fa fa-github"/>} onClick={() => this.buttonClick(author.get('html_url'))}>
33+
<Button variant="contained" startIcon={<i className="fa fa-github"/>} onClick={() => this.buttonClick(author.get('html_url'))}>
3334
Github page
3435
</Button>
3536
</div>

src/components/AuthorInfo/AuthorInfo.test.js.snap

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`AuthorInfo should render correctly 1`] = `
4-
<Card
4+
<ForwardRef(Card)
55
className="authorInfo"
6-
indent={15}
7-
padding={15}
8-
theme="light"
96
>
107
<div
118
className="logo"
@@ -33,17 +30,17 @@ exports[`AuthorInfo should render correctly 1`] = `
3330
<div
3431
className="button"
3532
>
36-
<Button
37-
icon={
33+
<ForwardRef(Button)
34+
onClick={[Function]}
35+
startIcon={
3836
<i
3937
className="fa fa-github"
4038
/>
4139
}
42-
indent={0}
43-
onClick={[Function]}
40+
variant="contained"
4441
>
4542
Github page
46-
</Button>
43+
</ForwardRef(Button)>
4744
</div>
48-
</Card>
45+
</ForwardRef(Card)>
4946
`;

src/components/HomeInfo/HomeInfo.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import ImmutablePropTypes from 'react-immutable-proptypes';
44
// Components
5-
import { Button, Card } from 'tigerspack';
5+
import Card from '@mui/material/Card';
6+
import Button from '@mui/material/Button';
67
// Styles
78
import styles from './HomeInfo.scss';
89

@@ -16,21 +17,31 @@ export default class HomeInfo extends Component {
1617
}),
1718
};
1819

20+
static defaultProps = {
21+
home: {
22+
name: 'react-redux-app-template',
23+
description: 'About\n'
24+
+ 'The template that will help you quickly start developing your project using React',
25+
html_url: 'https://github.com/awibox/react-redux-app-template',
26+
},
27+
};
28+
1929
buttonClick = (url) => window.open(url);
2030

2131
render() {
2232
const { home } = this.props;
2333
return (
2434
<div className={styles.homeInfo}>
25-
<Card theme={'light'}>
35+
<Card>
2636
<div className={styles.homeLogo}>
2737
<div className={styles.image}>
2838
<i className="fa fa-gears"></i>
2939
</div>
3040
<h1 className={styles.name}>{home.get('name')}</h1>
3141
<div className={styles.text}>{home.get('description')}</div>
3242
<div className={styles.button}>
33-
<Button icon={<i className="fa fa-github"/>} onClick={() => this.buttonClick(home.get('html_url'))}>
43+
<Button variant="contained" startIcon={<i className="fa fa-github"/>}
44+
onClick={() => this.buttonClick(home.get('html_url'))}>
3445
Download with Github
3546
</Button>
3647
</div>

src/components/HomeInfo/HomeInfo.test.js.snap

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ exports[`HomeInfo should render correctly 1`] = `
44
<div
55
className="homeInfo"
66
>
7-
<Card
8-
indent={15}
9-
padding={15}
10-
theme="light"
11-
>
7+
<ForwardRef(Card)>
128
<div
139
className="homeLogo"
1410
>
@@ -32,19 +28,19 @@ exports[`HomeInfo should render correctly 1`] = `
3228
<div
3329
className="button"
3430
>
35-
<Button
36-
icon={
31+
<ForwardRef(Button)
32+
onClick={[Function]}
33+
startIcon={
3734
<i
3835
className="fa fa-github"
3936
/>
4037
}
41-
indent={0}
42-
onClick={[Function]}
38+
variant="contained"
4339
>
4440
Download with Github
45-
</Button>
41+
</ForwardRef(Button)>
4642
</div>
4743
</div>
48-
</Card>
44+
</ForwardRef(Card)>
4945
</div>
5046
`;

src/components/ReposCard/ReposCard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
// Components
4-
import { Card } from 'tigerspack';
4+
import Card from '@mui/material/Card';
55
// Styles
66
import styles from './ReposCard.scss';
77

@@ -11,13 +11,13 @@ const ReposCard = (props) => {
1111
return (
1212
<div className={styles.repo}>
1313
{repo.id > 0
14-
&& <Card theme={'light'}>
14+
&& <Card style={{ padding: 15, marginBottom: 15 }}>
1515
<a href={repo.html_url} rel="noopener noreferrer" target="_blank" className={styles.name}>{repo.name}</a>
1616
<div className={styles.githubIcon}><i className="fa fa-github" aria-hidden="true"></i></div>
1717
<div className={styles.desc}>{repo.description}</div>
1818
<div className={styles.panel}>
1919
{repo.language
20-
&& <div className={styles.property}><i className="fa fa-circle" style={style}></i> {repo.language}</div>}
20+
&& <div className={styles.property}><i className="fa fa-circle" style={style}></i> {repo.language}</div>}
2121
<div className={styles.size}><i className="fa fa-file-archive-o"></i> {(repo.size / 1024).toFixed(2)} mb
2222
</div>
2323
<div className={styles.stars}><i className="fa fa-star" aria-hidden="true"></i> {repo.stargazers_count}

src/components/ReposCard/ReposCard.test.js.snap

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ exports[`ReposCard should render correctly 1`] = `
44
<div
55
className="repo"
66
>
7-
<Card
8-
indent={15}
9-
padding={15}
10-
theme="light"
7+
<ForwardRef(Card)
8+
style={
9+
Object {
10+
"marginBottom": 15,
11+
"padding": 15,
12+
}
13+
}
1114
>
1215
<a
1316
className="name"
@@ -63,6 +66,6 @@ exports[`ReposCard should render correctly 1`] = `
6366
10
6467
</div>
6568
</div>
66-
</Card>
69+
</ForwardRef(Card)>
6770
</div>
6871
`;

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const authorAccount = 'awibox';
77
export const gitHubApiUrl = 'https://api.github.com';
88

99
// Repos
10-
export const UserArray = [authorAccount, 'angular', 'facebook', 'reduxjs', 'webpack'];
10+
export const UserArray = ['microsoft', 'angular', 'facebook', 'reduxjs', 'webpack', 'error_User'];
1111

1212
// Routes
1313
export const routes = {

0 commit comments

Comments
 (0)