Skip to content

Commit 7c81d63

Browse files
committed
Initial commit
0 parents  commit 7c81d63

30 files changed

+17578
-0
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REACT_APP_API_URL=Link
2+
REACT_APP_API_KEY=Value

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

README.md

Whitespace-only changes.

package-lock.json

Lines changed: 17175 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "tumblrx",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@reduxjs/toolkit": "^1.6.2",
7+
"@testing-library/jest-dom": "^5.14.1",
8+
"@testing-library/react": "^11.2.7",
9+
"@testing-library/user-event": "^12.8.3",
10+
"axios": "^0.24.0",
11+
"node-sass": "^6.0.1",
12+
"react": "^17.0.2",
13+
"react-dom": "^17.0.2",
14+
"react-icons": "^4.3.1",
15+
"react-redux": "^7.2.6",
16+
"react-router-dom": "^5.3.0",
17+
"react-scripts": "4.0.3",
18+
"redux": "^4.1.2",
19+
"web-vitals": "^1.1.2"
20+
},
21+
"scripts": {
22+
"start": "react-scripts start",
23+
"build": "react-scripts build",
24+
"test": "react-scripts test",
25+
"eject": "react-scripts eject"
26+
},
27+
"eslintConfig": {
28+
"extends": [
29+
"react-app",
30+
"react-app/jest"
31+
]
32+
},
33+
"browserslist": {
34+
"production": [
35+
">0.2%",
36+
"not dead",
37+
"not op_mini all"
38+
],
39+
"development": [
40+
"last 1 chrome version",
41+
"last 1 firefox version",
42+
"last 1 safari version"
43+
]
44+
}
45+
}

public/favicon.ico

15 KB
Binary file not shown.

public/index.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="TumblrX is a clone of Tumblr website"
11+
/>
12+
<!--
13+
Notice the use of %PUBLIC_URL% in the tags above.
14+
It will be replaced with the URL of the `public` folder during the build.
15+
Only files inside the `public` folder can be referenced from the HTML.
16+
17+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
18+
work correctly both with client-side routing and a non-root public URL.
19+
Learn how to configure a non-root public URL by running `npm run build`.
20+
-->
21+
<title>TumblrX</title>
22+
</head>
23+
<body>
24+
<noscript>You need to enable JavaScript to run this app.</noscript>
25+
<div id="root"></div>
26+
<!--
27+
This HTML file is a template.
28+
If you open it directly in the browser, you will see an empty page.
29+
30+
You can add webfonts, meta tags, or analytics to this file.
31+
The build step will place the bundled scripts into the <body> tag.
32+
33+
To begin the development, run `npm start` or `yarn start`.
34+
To create a production bundle, use `npm run build` or `yarn build`.
35+
-->
36+
</body>
37+
</html>

src/App.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import React, { Fragment } from 'react';
2+
import { Route, Switch, Redirect } from 'react-router-dom';
3+
4+
import {
5+
NotFound,
6+
Dashboard,
7+
Explore,
8+
Inbox,
9+
New,
10+
LoginPage,
11+
} from './pages/pages';
12+
import { NavBar, ExploreLayout } from './components/Layouts/Layouts';
13+
const App = () => {
14+
return (
15+
<Fragment>
16+
<NavBar />
17+
<Switch>
18+
<Route exact path='/'>
19+
<Redirect to='/dashboard' />
20+
</Route>
21+
<Route exact path='/explore'>
22+
<ExploreLayout>
23+
<Explore />
24+
</ExploreLayout>
25+
</Route>
26+
<Route exact path='/dashboard'>
27+
<Dashboard />
28+
</Route>
29+
<Route exact path='/inbox'>
30+
<Inbox />
31+
</Route>
32+
<Route exact path='/new'>
33+
<New />
34+
</Route>
35+
<Route path='*'>
36+
<NotFound />
37+
</Route>
38+
</Switch>
39+
</Fragment>
40+
);
41+
};
42+
43+
export default App;

src/api/api.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import axios from 'axios';
2+
const { REACT_APP_API_URL: url, REACT_APP_API_KEY: key } = process.env;
3+
export default axios.create({
4+
baseURL: `${url}`,
5+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React, { Fragment } from 'react';
2+
import classes from './Explore.module.scss';
3+
const Explore = (props) => {
4+
return <main className={classes.main}>{props.children}</main>;
5+
};
6+
7+
export default Explore;

0 commit comments

Comments
 (0)