Skip to content

Commit 494a60b

Browse files
authored
Merge pull request #197 from codeisscience/gsoc-int
Merge GSoC branch to development(main) branch
2 parents 6db047d + a9ee324 commit 494a60b

File tree

103 files changed

+17798
-45906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+17798
-45906
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"Atomics": "readonly",
1313
"SharedBufferArray": "readonly"
1414
},
15-
"parser": "babel-eslint",
15+
"parser": "@babel/eslint-parser",
1616
"parserOptions": {
1717
"ecmaVersion": 2020,
1818
"sourceType": "module",
File renamed without changes.

assets/Code is Science - Persona.pdf

-64.4 KB
Binary file not shown.

assets/Contact.webp

-349 KB
Binary file not shown.

assets/Journals.webp

-169 KB
Binary file not shown.

assets/Landing page.webp

-1.78 MB
Binary file not shown.

assets/Manifesto.webp

-675 KB
Binary file not shown.

assets/News articles.webp

-1.23 MB
Binary file not shown.

package-lock.json

-44,856
This file was deleted.

package.json

+17-2
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,35 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@apollo/client": "^3.6.9",
67
"@babel/plugin-proposal-decorators": "^7.16.7",
8+
"@fortawesome/fontawesome-svg-core": "^6.1.1",
9+
"@fortawesome/free-brands-svg-icons": "^6.1.2",
10+
"@fortawesome/free-solid-svg-icons": "^6.1.1",
11+
"@fortawesome/react-fontawesome": "^0.1.18",
712
"@mdx-js/loader": "^1.6.22",
813
"@testing-library/jest-dom": "^5.11.4",
914
"@testing-library/user-event": "^12.1.10",
15+
"apollo-link-error": "^1.1.13",
16+
"axios": "^0.27.2",
1017
"bootstrap": "^5.0.1",
18+
"date-fns": "^2.29.1",
1119
"eslint-plugin-import": "^2.26.0",
1220
"eslint-plugin-markdown": "^2.2.1",
1321
"eslint-plugin-react-hooks": "^4.3.0",
22+
"graphql": "^16.6.0",
1423
"react": "^17.0.2",
1524
"react-bootstrap": "^1.6.1",
1625
"react-dom": "^17.0.2",
1726
"react-icons": "^4.2.0",
1827
"react-router": "^5.2.0",
1928
"react-router-bootstrap": "^0.25.0",
20-
"react-router-dom": "^5.2.0",
29+
"react-router-dom": "^5.3.3",
2130
"react-scripts": "4.0.3",
31+
"react-switch": "^7.0.0",
32+
"react-user-profile": "^1.0.3",
33+
"smooth-scroll": "^16.1.3",
34+
"styled-components": "^5.3.5",
2235
"web-vitals": "^1.0.1"
2336
},
2437
"scripts": {
@@ -57,7 +70,9 @@
5770
"eslint-plugin-prettier": "^4.0.0",
5871
"eslint-plugin-react": "^7.28.0",
5972
"jest-dom": "^4.0.0",
60-
"postcss": "^7.0.36",
73+
"postcss": "^7.0.39",
74+
"postcss-flexbugs-fixes": "^5.0.2",
75+
"postcss-preset-env": "^7.7.2",
6176
"prettier": "^2.5.1",
6277
"react-test-renderer": "^17.0.2"
6378
}

src/App.js

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/* eslint-disable array-callback-return */
2+
/* eslint-disable no-alert */
3+
/* eslint-disable react-hooks/exhaustive-deps */
4+
/* eslint-disable arrow-body-style */
5+
/* eslint-disable max-len */
6+
/* eslint-disable no-unused-vars */
7+
import { React } from 'react';
8+
9+
// Libraries
10+
import ReactDOM from 'react-dom';
11+
import { BrowserRouter as Router, Switch, Route, Redirect, useHistory } from 'react-router-dom';
12+
import { ApolloClient, InMemoryCache, ApolloProvider, HttpLink, from } from '@apollo/client';
13+
import { format } from 'date-fns';
14+
import { onError } from '@apollo/client/link/error';
15+
16+
// Styles
17+
import './index.css';
18+
import 'bootstrap/dist/css/bootstrap.min.css';
19+
20+
// Components
21+
import Profile from './components/Authentication/User-Profile/useprofile';
22+
import { Journal, Manifesto, Home } from './pages';
23+
import { Footer, Auth, Header, Login, JournalDetails, AddJournal, Layout } from './components';
24+
import Navbar from './components/marginals/Navbar/Navbar';
25+
import Edit from './components/EditJournal/Edit';
26+
27+
// Context
28+
import { DataProvider } from './context/DataContext';
29+
30+
// React-Apollo setup
31+
const errorLink = onError(({ graphqlErrors, networkError }) => {
32+
if (graphqlErrors) {
33+
graphqlErrors.map(({ message, location, path }) => {
34+
alert(`Graphql error ${message}`);
35+
});
36+
}
37+
});
38+
39+
const link = from([
40+
errorLink,
41+
new HttpLink({ uri: 'http://localhost:4000/graphql', credentials: 'include' }),
42+
]);
43+
44+
const client = new ApolloClient({
45+
cache: new InMemoryCache(),
46+
// credentials: 'include',
47+
link,
48+
});
49+
50+
function App() {
51+
return (
52+
<ApolloProvider client={client}>
53+
<Layout>
54+
<DataProvider>
55+
<Switch>
56+
<Route exact path='/'>
57+
<Home />
58+
</Route>
59+
<Route path='/journal'>
60+
<Journal />
61+
</Route>
62+
<Route exact path='/addjournal'>
63+
<AddJournal />
64+
</Route>
65+
<Route path='/edit/:issn'>
66+
<Edit />
67+
</Route>
68+
<Route path='/policy/:issn'>
69+
<JournalDetails />
70+
</Route>
71+
<Route path='/Signup'>
72+
<Auth />
73+
</Route>
74+
<Route path='/Login'>
75+
<Login />
76+
</Route>
77+
<Route path='/profile'>
78+
<Profile />
79+
</Route>
80+
<Redirect to='/' />
81+
</Switch>
82+
<Footer />
83+
</DataProvider>
84+
</Layout>
85+
</ApolloProvider>
86+
);
87+
}
88+
89+
export default App;

src/assets/bg.webp

-1.27 MB
Binary file not shown.

src/assets/clock.webp

-21.2 KB
Binary file not shown.

src/assets/hands-icon.webp

-3.84 KB
Binary file not shown.

src/assets/human-1.webp

-13.4 KB
Binary file not shown.

src/assets/human-2.webp

-7.93 KB
Binary file not shown.

src/assets/logo.webp

-9.11 KB
Binary file not shown.

src/assets/manifesto-img-1.webp

-359 KB
Binary file not shown.

src/assets/peers.webp

-20.6 KB
Binary file not shown.

src/assets/rocket.webp

-8.2 KB
Binary file not shown.

src/assets/section-img.webp

-226 KB
Binary file not shown.

src/assets/talking.webp

-53.2 KB
Binary file not shown.

src/assets/walking-man.webp

-9.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)