Skip to content

Commit

Permalink
Merge pull request #163 from padmajabhol/refactor-directories
Browse files Browse the repository at this point in the history
Restructure project directory
  • Loading branch information
ikayz authored Jun 19, 2022
2 parents be70624 + 4120b0f commit 6db047d
Show file tree
Hide file tree
Showing 34 changed files with 30,897 additions and 4,827 deletions.
35,607 changes: 30,842 additions & 4,765 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"bootstrap": "^5.0.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-markdown": "^2.2.1",
"eslint-plugin-react-hooks": "^4.3.0",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "^17.0.2",
Expand Down
9 changes: 0 additions & 9 deletions src/components/About.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable no-alert */
import { React, useState } from 'react';
import { Row, Col, Form, Button } from 'react-bootstrap';
import { showSuccessMessage, showErrorMessage } from "../helpers/alerts"
import { JournalValidation } from '../helpers/validate';
import { showSuccessMessage, showErrorMessage } from "../../helpers/alerts"
import { JournalValidation } from '../../helpers/validate';

function AddJournal() {
const [title, setTitle] = useState('');
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
/* eslint-disable react/no-unused-state */
/* eslint-disable react/state-in-constructor */
import { React, useState } from 'react';
import '../styles/Login.css';
import './Login.css';
import { Col, Row, Form, Button } from 'react-bootstrap';
import { showSuccessMessage, showErrorMessage } from '../helpers/alerts';
import { LoginValidation } from '../helpers/validate';
import { showSuccessMessage, showErrorMessage } from '../../../helpers/alerts';
import { LoginValidation } from '../../../helpers/validate';

function Login() {
const [details, setDetails] = useState({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable react/function-component-definition */
import { React, useState } from 'react';
import { Row, Col, Form, Button } from 'react-bootstrap';
import { showSuccessMessage, showErrorMessage } from '../helpers/alerts';
import { SignupValidation } from '../helpers/validate';
import '../styles/Signup.css';
import { showSuccessMessage, showErrorMessage } from '../../../helpers/alerts';
import { SignupValidation } from '../../../helpers/validate';
import './Signup.css';

const SignUp = () => {
const [details, setDetails] = useState({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.header {
background-image: url('../assets/bg.webp');
background-image: url('../../../assets/bg.webp');
height: 550px;
background-size: 150vw;
background-repeat: no-repeat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-unused-vars */
import React from 'react';
import '../styles/Header.css';
import './Header.css';
import { Button, Jumbotron } from 'react-bootstrap';
import Container from 'react-bootstrap/Container';
import {Link} from "react-router-dom";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from 'react';
import '../styles/LandingSection.css';
import './LandingSection.css';
import { Col, Container, Row, Image } from 'react-bootstrap';
import Img from '../assets/section-img.webp';
import ClockImg from '../assets/clock.webp';
import TalkingImg from '../assets/talking.webp';
import Img from '../../../assets/section-img.webp';
import ClockImg from '../../../assets/clock.webp';
import TalkingImg from '../../../assets/talking.webp';

function LandingSection() {
return (
Expand Down
6 changes: 0 additions & 6 deletions src/components/NewsArticles.js

This file was deleted.

Empty file removed src/components/Table.js
Empty file.
7 changes: 7 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from './marginals';

export { default as AddJournal} from './AddJournal/AddJournal';
export { default as Login } from './Authentication/Login/Login';
export { default as SignUp } from './Authentication/Signup/SignUp';
export { default as Header } from './Landing/Header/Header';
export { default as LandingSection } from './Landing/LandingSection/LandingSection';
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from 'react';
import '../styles/Footer.css';
import './Footer.css';
import { Container, Row, Col } from 'react-bootstrap';
import { ImTwitter, ImMail, ImGithub } from 'react-icons/im';
import { IoLogoSlack } from 'react-icons/io';
import RocketImg from '../assets/rocket.webp';
import RocketImg from '../../../assets/rocket.webp';

function Footer() {
return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import '../styles/Navigation.css';
import './Navigation.css';
import { Navbar, Nav } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
import Logo from '../assets/logo.webp';
import SearchBar from './Search';
import Logo from '../../../assets/logo.webp';
import { SearchBar } from '../index';

function Navigation() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { FiSearch } from 'react-icons/fi';
import '../index.css';
import '../../../index.css';

function SearchBar() {
return (
Expand Down
5 changes: 5 additions & 0 deletions src/components/marginals/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-disable import/no-cycle */

export { default as Footer } from "./Footer/Footer";
export { default as Navbar } from "./Navbar/Navigation";
export { default as SearchBar } from "./Search/Search";
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import '@testing-library/jest-dom';
import AddJournal from './AddJournal';
import AddJournal from '../index';

test('Add Journal renders the form correctly', () => {
const { getByText, getByLabelText } = render(<AddJournal />);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import '@testing-library/jest-dom';
import Login from '../pages/Login';
import Login from '../index';

test('Login renders the form correctly', () => {
const { getByText, getByLabelText } = render(<Login />);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import '@testing-library/jest-dom';
import SignUp from '../pages/SignUp';
import SignUp from '../index';

test('renders the form correctly', () => {
const { getByText, getByLabelText } = render(<SignUp />);
Expand Down
13 changes: 3 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@ import ReactDOM from 'react-dom';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import { Route, BrowserRouter as Router, Switch, Redirect } from 'react-router-dom';
import Navigation from './components/Navigation';
import Home from './pages/Home';
import Manifesto from './pages/Manifesto';
import Journal from './pages/Journal';
import Contact from './pages/Contact';
import Login from './pages/Login';
import SignUp from './pages/SignUp';
import Footer from './components/Footer';
import Header from './components/Header';
import { Journal, Contact, Manifesto, Home } from './pages';
import { Footer, Login, SignUp, Header, Navbar } from './components';

function App() {
return (
<Router>
<Navigation />
<Navbar />
<Switch>
<Route path='/' exact component={Home} />
<Route path='/manifesto' exact component={Manifesto} />
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/Contact.js → src/pages/Contact/Contact.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import '../styles/Contact.css';
import './Contact.css';
import { Container, Row, Col, Form, Button } from 'react-bootstrap';
import { ImTwitter, ImMail, ImGithub } from 'react-icons/im';
import { FaGitter } from 'react-icons/fa';
Expand Down
5 changes: 2 additions & 3 deletions src/pages/Home.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import Header from '../components/Header';
import LandingSection from '../components/LandingSection';
import "../styles/Header.css"
import { Header, LandingSection } from '../components';
import "../components/Landing/Header/Header.css"

function Home() {
return (
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions src/pages/Journal.js → src/pages/Journal/Journal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
/* eslint-disable no-unused-vars */
import React from 'react';
import { Col, Row, Container, Table } from 'react-bootstrap';
import "../styles/Journal.css"

import AddJournal from '../components/AddJournal';
import { AddJournal } from '../../components';

const Journal = () => (
<Container className='journal-padding'>
<Container style={{"padding-top": 130}}>
<h1 className='text-center'>Journals</h1>
<AddJournal />
</Container>
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions src/pages/Manifesto.js → src/pages/Manifesto/Manifesto.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
/* eslint-disable react/function-component-definition */
/* eslint-disable import/order */
import React from 'react';
import '../styles/Manifesto.css';
import './Manifesto.css';
import { Container, Row, Col, Image } from 'react-bootstrap';
import StandingImg from '../assets/human-2.webp';
import SittingImg from '../assets/human-1.webp';
import ImgOne from '../assets/manifesto-img-1.webp';
import WalkingImg from '../assets/walking-man.webp';
import PeersImg from '../assets/peers.webp';
import HandsIcon from '../assets/hands-icon.webp';
import StandingImg from '../../assets/human-2.webp';
import SittingImg from '../../assets/human-1.webp';
import ImgOne from '../../assets/manifesto-img-1.webp';
import WalkingImg from '../../assets/walking-man.webp';
import PeersImg from '../../assets/peers.webp';
import HandsIcon from '../../assets/hands-icon.webp';
import { ImTwitter, ImMail, ImGithub } from 'react-icons/im';

const Manifesto = () => (
Expand Down
4 changes: 4 additions & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as Contact } from './Contact/Contact';
export { default as Journal } from './Journal/Journal';
export { default as Manifesto } from './Manifesto/Manifesto';
export { default as Home } from './Home';

0 comments on commit 6db047d

Please sign in to comment.