diff --git a/src/App.js b/src/App.js deleted file mode 100644 index 27e2d8e..0000000 --- a/src/App.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import './App.css'; - -function App() { - return ( -
-
- ); -} - -export default App; diff --git a/src/App.test.js b/src/App.test.js deleted file mode 100644 index 7f644a7..0000000 --- a/src/App.test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import App from './App'; - -test.skip('renders learn react link', () => { - const { getByText } = render(); - const linkElement = getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/DisplayView.jsx b/src/DisplayView.jsx new file mode 100644 index 0000000..9a44709 --- /dev/null +++ b/src/DisplayView.jsx @@ -0,0 +1,12 @@ +import React from 'react'; + +export default function DisplayView() { + /************************************ + * Render + ************************************/ + + return ( + <> + + ); +} diff --git a/src/EditMode.jsx b/src/EditMode.jsx new file mode 100644 index 0000000..0ecb4ee --- /dev/null +++ b/src/EditMode.jsx @@ -0,0 +1,30 @@ +import React, { useState } from 'react'; +import EditView from './EditView'; +import DisplayView from './DisplayView'; + + /************************************ + * Constants + ************************************/ + +const EDIT_VIEW = 'EDIT'; +const DISPLAY_VIEW = 'DISPLAY'; + +export default function EditMode() { + /************************************ + * State + ************************************/ + + const [view, setView] = useState(EDIT_VIEW); + + /************************************ + * Render + ************************************/ + + return ( +
+ + + { view === EDIT_VIEW ? : } +
+ ); +} diff --git a/src/EditView.jsx b/src/EditView.jsx new file mode 100644 index 0000000..a79ef0c --- /dev/null +++ b/src/EditView.jsx @@ -0,0 +1,12 @@ +import React from 'react'; + +export default function EditView() { + /************************************ + * Render + ************************************/ + + return ( + <> + + ); +} diff --git a/src/LeifdownApp.jsx b/src/LeifdownApp.jsx new file mode 100644 index 0000000..f01aaec --- /dev/null +++ b/src/LeifdownApp.jsx @@ -0,0 +1,13 @@ +import React from 'react'; +import './App.css'; +import EditMode from './EditMode'; + +export default function LeifdownApp() { + /************************************ + * Render + ************************************/ + + return ( + + ); +} diff --git a/src/index.js b/src/index.js index f5185c1..d6aebc4 100644 --- a/src/index.js +++ b/src/index.js @@ -1,12 +1,12 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; -import App from './App'; +import LeifdownApp from './LeifdownApp'; import * as serviceWorker from './serviceWorker'; ReactDOM.render( - + , document.getElementById('root') );