From a762f4cc75b107d1690a93622c3fce8f1d1d7b10 Mon Sep 17 00:00:00 2001 From: Tomasz Date: Sun, 10 Sep 2017 10:29:02 +0100 Subject: [PATCH] moved components to new folders --- src/App/App.js | 6 +++--- src/{routes/cards => common}/Card.js | 2 +- src/{routes/cards => common}/Cards.js | 4 ++-- src/{routes/search => common}/SearchBar.js | 2 +- src/common/{ => word}/LexicalEntries.js | 0 src/common/{ => word}/LexicalEntry.js | 0 src/common/{ => word}/Sense.js | 0 src/common/{ => word}/Word.js | 4 ++-- src/common/{ => word}/WordContainer.js | 2 +- src/routes/{cards => }/CardsContainer.js | 4 ++-- src/routes/{search => }/Search.js | 6 +++--- 11 files changed, 15 insertions(+), 15 deletions(-) rename src/{routes/cards => common}/Card.js (96%) rename src/{routes/cards => common}/Cards.js (86%) rename src/{routes/search => common}/SearchBar.js (95%) rename src/common/{ => word}/LexicalEntries.js (100%) rename src/common/{ => word}/LexicalEntry.js (100%) rename src/common/{ => word}/Sense.js (100%) rename src/common/{ => word}/Word.js (88%) rename src/common/{ => word}/WordContainer.js (95%) rename src/routes/{cards => }/CardsContainer.js (91%) rename src/routes/{search => }/Search.js (82%) diff --git a/src/App/App.js b/src/App/App.js index 56313c1..140a185 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -8,10 +8,10 @@ import { import styled from 'styled-components'; import NavBarContainer from './NavBarContainer'; -import Search from '../routes/search/Search'; -import CardsContainer from '../routes/cards/CardsContainer'; +import Search from '../routes/Search'; +import CardsContainer from '../routes/CardsContainer'; import MyWordsContainer from '../routes/MyWordsContainer'; -import WordContainer from '../common/WordContainer'; +import WordContainer from '../common/word/WordContainer'; import Logout from '../routes/LogOut'; import Login from '../routes/Login'; import SetLogged from '../routes/SetLogged'; diff --git a/src/routes/cards/Card.js b/src/common/Card.js similarity index 96% rename from src/routes/cards/Card.js rename to src/common/Card.js index 17465a4..8f491e0 100644 --- a/src/routes/cards/Card.js +++ b/src/common/Card.js @@ -1,6 +1,6 @@ import React from 'react' import styled from 'styled-components' -import WordContainer from './../../common/WordContainer.js' +import WordContainer from './word/WordContainer.js' const Perspective = styled.div` display: flex; diff --git a/src/routes/cards/Cards.js b/src/common/Cards.js similarity index 86% rename from src/routes/cards/Cards.js rename to src/common/Cards.js index 8d07aee..809b90c 100644 --- a/src/routes/cards/Cards.js +++ b/src/common/Cards.js @@ -1,7 +1,7 @@ import React from 'react' -import {RouteWrapper, BigSpinner} from '../../common/routeComponents'; +import {RouteWrapper, BigSpinner} from './routeComponents'; import Card from './Card' -import Button1 from '../../common/buttons/Button1.js' +import Button1 from './buttons/Button1.js' import styled from 'styled-components' const Footer = styled.div` diff --git a/src/routes/search/SearchBar.js b/src/common/SearchBar.js similarity index 95% rename from src/routes/search/SearchBar.js rename to src/common/SearchBar.js index 6ed81a6..5944bf4 100644 --- a/src/routes/search/SearchBar.js +++ b/src/common/SearchBar.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import styled from 'styled-components'; -import createHistory from 'history/createBrowserHistory' +import createHistory from '../../node_modules/history/createBrowserHistory' const history = createHistory(); const Wrapper = styled.div` diff --git a/src/common/LexicalEntries.js b/src/common/word/LexicalEntries.js similarity index 100% rename from src/common/LexicalEntries.js rename to src/common/word/LexicalEntries.js diff --git a/src/common/LexicalEntry.js b/src/common/word/LexicalEntry.js similarity index 100% rename from src/common/LexicalEntry.js rename to src/common/word/LexicalEntry.js diff --git a/src/common/Sense.js b/src/common/word/Sense.js similarity index 100% rename from src/common/Sense.js rename to src/common/word/Sense.js diff --git a/src/common/Word.js b/src/common/word/Word.js similarity index 88% rename from src/common/Word.js rename to src/common/word/Word.js index 4154df2..43d8a6f 100644 --- a/src/common/Word.js +++ b/src/common/word/Word.js @@ -1,8 +1,8 @@ import React from 'react'; import styled from 'styled-components'; -import {BigSpinner} from '../common/routeComponents'; +import {BigSpinner} from '../routeComponents'; import LexicalEntries from './LexicalEntries'; -import FavoriteContainer from './FavoriteContainer.js'; +import FavoriteContainer from './../FavoriteContainer.js'; const WordWrapper = styled.div` margin: 30px 10px; diff --git a/src/common/WordContainer.js b/src/common/word/WordContainer.js similarity index 95% rename from src/common/WordContainer.js rename to src/common/word/WordContainer.js index 4e6046c..8f5d64a 100644 --- a/src/common/WordContainer.js +++ b/src/common/word/WordContainer.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import * as api from './../api/api'; +import * as api from './../../api/api'; import Word from './Word'; class WordContainer extends Component { diff --git a/src/routes/cards/CardsContainer.js b/src/routes/CardsContainer.js similarity index 91% rename from src/routes/cards/CardsContainer.js rename to src/routes/CardsContainer.js index c0ee047..77db737 100644 --- a/src/routes/cards/CardsContainer.js +++ b/src/routes/CardsContainer.js @@ -1,6 +1,6 @@ import React from 'react' -import * as api from './../../api/api' -import Cards from './Cards' +import * as api from './../api/api' +import Cards from './../common/Cards' export default class extends React.Component { // TODO: remove duplication with myWordsContainer. constructor() { diff --git a/src/routes/search/Search.js b/src/routes/Search.js similarity index 82% rename from src/routes/search/Search.js rename to src/routes/Search.js index e21a9ab..ec82886 100644 --- a/src/routes/search/Search.js +++ b/src/routes/Search.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; -import {RouteWrapper} from '../../common/routeComponents'; -import SearchBar from './SearchBar'; -import WordContainer from './../../common/WordContainer'; +import {RouteWrapper} from '../common/routeComponents'; +import SearchBar from './../common/SearchBar'; +import WordContainer from './../common/word/WordContainer'; export default class Home extends Component {