From 538e911b215ff0f4362deeec0b334ee0ee1f852c Mon Sep 17 00:00:00 2001 From: Sorrel Bri Date: Wed, 8 Jan 2020 17:17:10 -0800 Subject: [PATCH] patch page function tests, import pages in App --- packages/server/src/App.js | 28 ++++++++++++++++--- packages/server/src/pages/Account/Account.js | 3 +- packages/server/src/pages/Game/Game.js | 3 +- .../Game/{Game.test.scss => Game.test.js} | 0 packages/server/src/pages/Home/Home.js | 3 +- .../Home/{Home.test.scss => Home.test.js} | 0 packages/server/src/pages/Landing/Landing.js | 11 -------- packages/server/src/pages/News/News.js | 12 ++++++++ .../{Landing/Landing.scss => News/News.scss} | 0 .../Landing.test.scss => News/News.test.js} | 0 packages/server/src/pages/Room/Room.js | 3 +- .../Room/{Room.test.scss => Room.test.js} | 0 12 files changed, 44 insertions(+), 19 deletions(-) rename packages/server/src/pages/Game/{Game.test.scss => Game.test.js} (100%) rename packages/server/src/pages/Home/{Home.test.scss => Home.test.js} (100%) delete mode 100644 packages/server/src/pages/Landing/Landing.js create mode 100644 packages/server/src/pages/News/News.js rename packages/server/src/pages/{Landing/Landing.scss => News/News.scss} (100%) rename packages/server/src/pages/{Landing/Landing.test.scss => News/News.test.js} (100%) rename packages/server/src/pages/Room/{Room.test.scss => Room.test.js} (100%) diff --git a/packages/server/src/App.js b/packages/server/src/App.js index 76c0346..6379ff6 100644 --- a/packages/server/src/App.js +++ b/packages/server/src/App.js @@ -5,6 +5,13 @@ import config from './config'; import { Switch, Route } from 'react-router-dom'; import socketIOClient from 'socket.io-client'; + +import Account from './pages/Account/Account'; +import Game from './pages/Game/Game'; +import Home from './pages/Home/Home'; +import News from './pages/News/News'; +import Room from './pages/Room/Room'; + export const socket = socketIOClient(config.apiAddress); function App() { @@ -20,12 +27,25 @@ function App() { {socketData ?

{socketData}

: <>} - -

Index

+ + - -

Game

+ + + + + + + + + + + + + + {/* Add ternary for login */} +
diff --git a/packages/server/src/pages/Account/Account.js b/packages/server/src/pages/Account/Account.js index 93a189f..5c7c255 100644 --- a/packages/server/src/pages/Account/Account.js +++ b/packages/server/src/pages/Account/Account.js @@ -1,9 +1,10 @@ import React from 'react'; -import './Accounts.scss'; +import './Account.scss'; const Account = () => { return ( <> +

Account

); } diff --git a/packages/server/src/pages/Game/Game.js b/packages/server/src/pages/Game/Game.js index b1f4bb1..17aaaaf 100644 --- a/packages/server/src/pages/Game/Game.js +++ b/packages/server/src/pages/Game/Game.js @@ -1,9 +1,10 @@ import React from 'react'; -import './Accounts.scss'; +import './Game.scss'; const Game = () => { return ( <> +

Game

); } diff --git a/packages/server/src/pages/Game/Game.test.scss b/packages/server/src/pages/Game/Game.test.js similarity index 100% rename from packages/server/src/pages/Game/Game.test.scss rename to packages/server/src/pages/Game/Game.test.js diff --git a/packages/server/src/pages/Home/Home.js b/packages/server/src/pages/Home/Home.js index 1708f74..292eba5 100644 --- a/packages/server/src/pages/Home/Home.js +++ b/packages/server/src/pages/Home/Home.js @@ -1,9 +1,10 @@ import React from 'react'; -import './Accounts.scss'; +import './Home.scss'; const Home = () => { return ( <> +

Home

); } diff --git a/packages/server/src/pages/Home/Home.test.scss b/packages/server/src/pages/Home/Home.test.js similarity index 100% rename from packages/server/src/pages/Home/Home.test.scss rename to packages/server/src/pages/Home/Home.test.js diff --git a/packages/server/src/pages/Landing/Landing.js b/packages/server/src/pages/Landing/Landing.js deleted file mode 100644 index c11710e..0000000 --- a/packages/server/src/pages/Landing/Landing.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import './Accounts.scss'; - -const Landing = () => { - return ( - <> - - ); -} - -export default Landing; \ No newline at end of file diff --git a/packages/server/src/pages/News/News.js b/packages/server/src/pages/News/News.js new file mode 100644 index 0000000..f328772 --- /dev/null +++ b/packages/server/src/pages/News/News.js @@ -0,0 +1,12 @@ +import React from 'react'; +import './News.scss'; + +const News = () => { + return ( + <> +

News

+ + ); +} + +export default News; \ No newline at end of file diff --git a/packages/server/src/pages/Landing/Landing.scss b/packages/server/src/pages/News/News.scss similarity index 100% rename from packages/server/src/pages/Landing/Landing.scss rename to packages/server/src/pages/News/News.scss diff --git a/packages/server/src/pages/Landing/Landing.test.scss b/packages/server/src/pages/News/News.test.js similarity index 100% rename from packages/server/src/pages/Landing/Landing.test.scss rename to packages/server/src/pages/News/News.test.js diff --git a/packages/server/src/pages/Room/Room.js b/packages/server/src/pages/Room/Room.js index f67119c..115002e 100644 --- a/packages/server/src/pages/Room/Room.js +++ b/packages/server/src/pages/Room/Room.js @@ -1,9 +1,10 @@ import React from 'react'; -import './Accounts.scss'; +import './Room.scss'; const Room = () => { return ( <> +

Room

); } diff --git a/packages/server/src/pages/Room/Room.test.scss b/packages/server/src/pages/Room/Room.test.js similarity index 100% rename from packages/server/src/pages/Room/Room.test.scss rename to packages/server/src/pages/Room/Room.test.js