GithubHelp home page GithubHelp logo

movienote's People

Contributors

rory0304 avatar sersue avatar yelimpark avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

yelimpark sersue

movienote's Issues

movienote

일단... 미안합니다...
안될것같으면 초장에 얘기했어야 하는데 늦어서...

import React from "react";
import Axios from "axios";
import {commonAPI, secretKey} from "../../variable";
import PersonIcon from "../../assets/icons8-person-90.png";

class MyNote extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      lists : [
        {
          movie_id : 531219,
          date : 20200202,
          contents : "가나다"
        },
        {
          movie_id : 531219,
          date : 20200302,
          contents : "가나다"
        },
        {
          movie_id : 531219,
          date : 20200402,
          contents : "가나다"
        }
      ],

      noteslist : []
    };
  }

  componentDidMount() {
    this.make();
  }

  listing = this.state.lists.map(
    async function make(one){

      const movie_url = `${commonAPI}${one.movie_id}?api_key=${secretKey}`;
      await Axios.get(movie_url).then(res => {
        this.setState({
          noteslist:
          <div className="Note">
          <h4>{one.date}</h4>
          <p>{res.data.title}</p>
          <p>{one.contents}</p>
          </div>
        })
      });
      
    }
  );

  render(){
    return (
      <div>
        <img src={PersonIcon} alt="PersonIcon" />
        <h2>user</h2>
        <input className="searching" placeholder="Searching" />
        <div className="notes">
         {this.state.noteslist}
        </div>
      </div>
    );
  }
}

export default MyNote;

MyNote.js 코드 현재까지 짜놓은건데 1) 일단 오류나고 2) 이게 된다고 해도 noteslist에 마지막 map(one)만 저장되긴 함
어떻게 해결할지 의견부탁드립니다.
ㅜㅜㅜ

정 안된다싶으면 영화 제목/포스터 역시 db에 저장한 셈치고 샘플데이터에 넣어버리고 css 먹여서 올리겠습니다.

Title

Title이 버튼으로 만들어져 있는데, 눌렀을 때의 기능이 아직 추가되지 않은 것 같습니다.
Title 버튼을 눌렀을 때 리스트가 새로 생성되거나, 전체 페이지의 새로고침 기능이 추가되었으면 좋겠습니다!

DB

원래 계획은 heroku에서 제공하는 db를 사용하는 것이였지만, 유료서비스인 관계로 대안을 몇개 생각해보았습니다.

  • AWS 등 다른 서비스를 이용하여 db 서버를 구축한다.
  • 프로젝트용이고, db가 간단한 구조이므로 그냥 txt 파일을 이용한다

더 나은 아이디어 있는 분...

영화 별점 매기는 기능

XD에는 별점 매기는 기능이 있는 것 같은데, 리뷰 페이지에는 구현이 안되어 있습니다.

별점 5점 기준으로 마우스 드래그를 하면 별이 채워지는 기능 구현하면 좋겠습니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.