Skip to content

Commit

Permalink
Merge pull request #197 from codeisscience/gsoc-int
Browse files Browse the repository at this point in the history
Merge GSoC branch to development(main) branch
  • Loading branch information
padmajabhol authored Sep 24, 2022
2 parents 6db047d + a9ee324 commit 494a60b
Show file tree
Hide file tree
Showing 103 changed files with 17,798 additions and 45,906 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Atomics": "readonly",
"SharedBufferArray": "readonly"
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
Expand Down
File renamed without changes.
Binary file removed assets/Code is Science - Persona.pdf
Binary file not shown.
Binary file removed assets/Contact.webp
Binary file not shown.
Binary file removed assets/Journals.webp
Binary file not shown.
Binary file removed assets/Landing page.webp
Binary file not shown.
Binary file removed assets/Manifesto.webp
Binary file not shown.
Binary file removed assets/News articles.webp
Binary file not shown.
44,856 changes: 0 additions & 44,856 deletions package-lock.json

This file was deleted.

19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,35 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@apollo/client": "^3.6.9",
"@babel/plugin-proposal-decorators": "^7.16.7",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@mdx-js/loader": "^1.6.22",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/user-event": "^12.1.10",
"apollo-link-error": "^1.1.13",
"axios": "^0.27.2",
"bootstrap": "^5.0.1",
"date-fns": "^2.29.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-markdown": "^2.2.1",
"eslint-plugin-react-hooks": "^4.3.0",
"graphql": "^16.6.0",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-router": "^5.2.0",
"react-router-bootstrap": "^0.25.0",
"react-router-dom": "^5.2.0",
"react-router-dom": "^5.3.3",
"react-scripts": "4.0.3",
"react-switch": "^7.0.0",
"react-user-profile": "^1.0.3",
"smooth-scroll": "^16.1.3",
"styled-components": "^5.3.5",
"web-vitals": "^1.0.1"
},
"scripts": {
Expand Down Expand Up @@ -57,7 +70,9 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"jest-dom": "^4.0.0",
"postcss": "^7.0.36",
"postcss": "^7.0.39",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^7.7.2",
"prettier": "^2.5.1",
"react-test-renderer": "^17.0.2"
}
Expand Down
89 changes: 89 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/* eslint-disable array-callback-return */
/* eslint-disable no-alert */
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable arrow-body-style */
/* eslint-disable max-len */
/* eslint-disable no-unused-vars */
import { React } from 'react';

// Libraries
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Switch, Route, Redirect, useHistory } from 'react-router-dom';
import { ApolloClient, InMemoryCache, ApolloProvider, HttpLink, from } from '@apollo/client';
import { format } from 'date-fns';
import { onError } from '@apollo/client/link/error';

// Styles
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';

// Components
import Profile from './components/Authentication/User-Profile/useprofile';
import { Journal, Manifesto, Home } from './pages';
import { Footer, Auth, Header, Login, JournalDetails, AddJournal, Layout } from './components';
import Navbar from './components/marginals/Navbar/Navbar';
import Edit from './components/EditJournal/Edit';

// Context
import { DataProvider } from './context/DataContext';

// React-Apollo setup
const errorLink = onError(({ graphqlErrors, networkError }) => {
if (graphqlErrors) {
graphqlErrors.map(({ message, location, path }) => {
alert(`Graphql error ${message}`);
});
}
});

const link = from([
errorLink,
new HttpLink({ uri: 'http://localhost:4000/graphql', credentials: 'include' }),
]);

const client = new ApolloClient({
cache: new InMemoryCache(),
// credentials: 'include',
link,
});

function App() {
return (
<ApolloProvider client={client}>
<Layout>
<DataProvider>
<Switch>
<Route exact path='/'>
<Home />
</Route>
<Route path='/journal'>
<Journal />
</Route>
<Route exact path='/addjournal'>
<AddJournal />
</Route>
<Route path='/edit/:issn'>
<Edit />
</Route>
<Route path='/policy/:issn'>
<JournalDetails />
</Route>
<Route path='/Signup'>
<Auth />
</Route>
<Route path='/Login'>
<Login />
</Route>
<Route path='/profile'>
<Profile />
</Route>
<Redirect to='/' />
</Switch>
<Footer />
</DataProvider>
</Layout>
</ApolloProvider>
);
}

export default App;
Binary file removed src/assets/bg.webp
Binary file not shown.
Binary file removed src/assets/clock.webp
Binary file not shown.
Binary file removed src/assets/hands-icon.webp
Binary file not shown.
Binary file removed src/assets/human-1.webp
Binary file not shown.
Binary file removed src/assets/human-2.webp
Binary file not shown.
Binary file removed src/assets/logo.webp
Binary file not shown.
Binary file removed src/assets/manifesto-img-1.webp
Binary file not shown.
Binary file removed src/assets/peers.webp
Binary file not shown.
Binary file removed src/assets/rocket.webp
Binary file not shown.
Binary file removed src/assets/section-img.webp
Binary file not shown.
Binary file removed src/assets/talking.webp
Binary file not shown.
Binary file removed src/assets/walking-man.webp
Binary file not shown.
Loading

0 comments on commit 494a60b

Please sign in to comment.