diff --git a/front-end-project-week/todo-project/src/App.js b/front-end-project-week/todo-project/src/App.js index 6f5144e..da65f62 100644 --- a/front-end-project-week/todo-project/src/App.js +++ b/front-end-project-week/todo-project/src/App.js @@ -1,10 +1,6 @@ import React, { Component } from 'react'; import { Route } from 'react-router-dom' import NoteContainer from './NoteContainer' -import NavContainer from './NavContainer' -import CreateNote from './CreateNote/CreateNote' -import ViewNote from './NoteView/NoteView' -import EditNote from './EditNote/EditNote' import Authentication from './Authentication/Authenticate' import './App.css'; @@ -13,16 +9,8 @@ class App extends Component { render() { return (
-
- -
-
- - - -
-
+ ); } } diff --git a/front-end-project-week/todo-project/src/CreateNote/CreateNote.js b/front-end-project-week/todo-project/src/CreateNote/CreateNote.js deleted file mode 100644 index 5923a6c..0000000 --- a/front-end-project-week/todo-project/src/CreateNote/CreateNote.js +++ /dev/null @@ -1,61 +0,0 @@ -import React, { Component } from 'react' -import axios from 'axios' -import Form from './form' - - -const titleBold = { - 'fontWeight': 'bold', - 'fontSize': '2rem', - 'marginLeft': '1.3%' -} - -export default class CreateNote extends Component { - constructor(props){ - super(props) - this.state = { - title: '', - content: '', - } - } - - handleInput = e => { - this.setState({ [e.target.name]: e.target.value }) - } - - id = localStorage.getItem('id') - - saveNote = () => { - if(this.state.title.length >= 60) { - window.alert('Please keep title under 60 charecters') - } else if (!this.state.title || !this.state.content) { - window.alert('Please provide a title and content') - } else { - const myObj = { title: this.state.title, content: this.state.content, userId: this.id } - axios - .post('https://fsw-14-project-notes.herokuapp.com/notes', myObj) - .then(response => { - console.log(response) - window.location.replace('/') - }) - .catch(err => { - console.log(err) - }) - this.setState({ title: '', content: '' }) - } - } - - render() { - return ( -
-

Create New Note:

-
-
- - ) - } -} \ No newline at end of file diff --git a/front-end-project-week/todo-project/src/CreateNote/form.css b/front-end-project-week/todo-project/src/CreateNote/form.css deleted file mode 100644 index 383786c..0000000 --- a/front-end-project-week/todo-project/src/CreateNote/form.css +++ /dev/null @@ -1,25 +0,0 @@ -.form { - margin-left: 1%; - display: flex; - flex-direction: column; - height: 85vh; -} -.textBody { - width: 98.5%; - margin-top: 1%; - height: 35vh; -} -.titleForm { - width: 60%; - height: 3.5vh; - border-radius: 1px; -} -.formButton { - width: 20%; - margin-top: 1%; - padding: 1% 1%; - background: #24B8BD; - color: white; - font-weight: bold; - font-size: 1rem; -} \ No newline at end of file diff --git a/front-end-project-week/todo-project/src/CreateNote/form.js b/front-end-project-week/todo-project/src/CreateNote/form.js deleted file mode 100644 index e5fd448..0000000 --- a/front-end-project-week/todo-project/src/CreateNote/form.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react' -import './form.css' - -function form(props) { - return ( -
- -