sarahholder / og-emoji

0 stars 0 forks source link

Single Entry View #8

Open sarahholder opened 4 years ago

sarahholder commented 4 years ago

User Story

As a user on the home page there will be a summary of the previously entered journal entries. Each journal entry will be clickable to a single entry view. The home page will show a summary view of the previously entered journal entries' emoji and the date it was entered. Once a previous entry is selected --the Single entry page will show. It will have the date of entry at the top and the emoji taht was selected, the comments entered, any quotes liked on the previous journal entry date and will show the previously shown resources.

AC

A user can click on previous journal entry listed at the bottom half of the screen. Once a particular date/entry is clicked-- the single view page will show. On the single view page at the top will be the selected emoji and next to that the previously added comments added. It will show if a quote is favorited. And it will show previously shown resources below.

DEV

  1. import { link } from 'react-router-dom'
  2. In src/components/pages create a folder called singleEntryView with singleEntryView.js and singleEntryView.scss
  3. set the state journalEntry = {}
  4. componentDidMount() see below
  5. inside the render show: -- date of journal entry (top center) -- emoji -- comments -- any favorited quotes -- resources
sarahholder commented 4 years ago

https://momentjs.com/

sarahholder commented 4 years ago
const { itemId } = this.props.match.params;
    stuffData.getSingleItem(itemId)
      .then((response) => this.setState({ item: response.data }))
      .catch((err) => console.error('unable to get single item: ', err));