Skip to content

Commit 06fd423

Browse files
initial commit from create React App
0 parents  commit 06fd423

31 files changed

+17256
-0
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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*

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2+
3+
## Available Scripts
4+
5+
In the project directory, you can run:
6+
7+
### `npm install`
8+
9+
It Will Installs all dependencies in package.json.
10+
11+
### `npm start`
12+
13+
Runs the app in the development mode.<br />
14+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
15+
16+
The page will reload if you make edits in any files.<br/>
17+
18+
### `npm run build`
19+
20+
Builds the app for production to the `build` folder.<br/>
21+
It correctly bundles React in production mode and optimizes the build for the best performance.
22+
23+
The build is minified and the filenames include the hashes.<br/>
24+
Your app is ready to be deployed!
25+
26+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

package-lock.json

Lines changed: 16068 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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "truecaller-blog",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@testing-library/jest-dom": "^4.2.4",
7+
"@testing-library/react": "^9.3.2",
8+
"@testing-library/user-event": "^7.1.2",
9+
"@types/jest": "^24.0.0",
10+
"@types/node": "^12.0.0",
11+
"@types/react": "^16.9.0",
12+
"@types/react-dom": "^16.9.0",
13+
"@types/react-redux": "^7.1.9",
14+
"@types/react-router": "^5.1.8",
15+
"@types/react-router-redux": "^5.0.18",
16+
"axios": "^0.20.0",
17+
"react": "^16.13.1",
18+
"react-dom": "^16.13.1",
19+
"react-redux": "^7.2.1",
20+
"react-router-config": "^5.1.1",
21+
"react-router-dom": "^5.2.0",
22+
"react-router-redux": "^5.0.0-alpha.9",
23+
"react-scripts": "3.4.3",
24+
"redux": "^4.0.5",
25+
"typescript": "~3.7.2"
26+
},
27+
"scripts": {
28+
"start": "react-scripts start",
29+
"build": "react-scripts build",
30+
"test": "react-scripts test",
31+
"eject": "react-scripts eject"
32+
},
33+
"eslintConfig": {
34+
"extends": "react-app"
35+
},
36+
"browserslist": {
37+
"production": [
38+
">0.2%",
39+
"not dead",
40+
"not op_mini all"
41+
],
42+
"development": [
43+
"last 1 chrome version",
44+
"last 1 firefox version",
45+
"last 1 safari version"
46+
]
47+
}
48+
}

public/favicon.png

3.06 KB
Loading

public/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
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="Truecaller Blog -"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>Truecaller Blog -</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>

public/manifest.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.png",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

public/truecaller-logo.png

6.48 KB
Loading

src/App.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import React from 'react'
2+
import './css/index.css'
3+
import Home from './components/home/Home'
4+
import SinglePost from './components/post/SinglePost'
5+
import { Router, Route, Switch } from 'react-router'
6+
import Header from './components/common/Header'
7+
import Categories from './components/common/Categories'
8+
import TopTags from './components/common/TopTags'
9+
import Footer from './components/common/Footer'
10+
import { history } from './utils/router'
11+
12+
const App = () => {
13+
return (
14+
<div>
15+
<Header/>
16+
<div className="container">
17+
<div className="main-container">
18+
<Router history={history}>
19+
<Switch>
20+
<Route path="/post/:postId/:postSlug">
21+
<SinglePost />
22+
</Route>
23+
<Route path="/:type/:subType">
24+
<Home />
25+
</Route>
26+
<Route path="/">
27+
<Home />
28+
</Route>
29+
</Switch>
30+
</Router>
31+
</div>
32+
<div className="side-container">
33+
<div className="categories-container">
34+
<h2> Categories </h2>
35+
<Categories/>
36+
</div>
37+
<div className="top-tags-container">
38+
<h2> Top Tags </h2>
39+
<TopTags/>
40+
</div>
41+
</div>
42+
</div>
43+
<Footer/>
44+
</div>
45+
)
46+
}
47+
48+
export default App
49+

0 commit comments

Comments
 (0)