๐Ÿ”ฅ Today


  • [movie-website]

    • genre-page

      • ์˜ํ™” ์ถœ๋ ฅ ๋ถ€๋ถ„์— ์œ ์ €๊ฐ€ ์„ ํƒํ•œ ์žฅ๋ฅด๋ช…๋„ ํ•จ๊ป˜ ์ถœ๋ ฅ๋˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด ์žฅ๋ฅด ์„ ํƒ์‹œ ์žฅ๋ฅด๋ช…๊นŒ์ง€ ๊ฐ™์ด ์ €์žฅ๋  ์ˆ˜ ์žˆ๋„๋ก ์ฝ”๋“œ๋ฅผ ๋ฐ”๊ฟจ๋‹ค.


const USER_SELECT_GENRE = "genre";

export const setGenre = (selectGenres) => {
  localStorage.setItem(USER_SELECT_GENRE, JSON.stringify(selectGenres));
};

export const getGenre = JSON.parse(localStorage.getItem(USER_SELECT_GENRE));


  • ์žฅ๋ฅด๋ช…๊ณผ ์žฅ๋ฅดid๋ฅผ ํ•จ๊ป˜ ์ €์žฅํ•˜๋‹ค๋ณด๋‹ˆ ๊ฐ์ฒด๋ฐฐ์—ด์—์„œ ๊ฐ์ฒด๋ฅผ ์ฐพ๋Š” ๋ถ€๋ถ„์ด ์–ด๋ ค์›Œ์กŒ๋‹ค. ์›๋ž˜ ๋ฐฐ์—ด์—์„œ id๋ฅผ ์ฐพ์„ ๋•Œ๋Š” includes๋ฅผ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ ๊ฐ์ฒด๋ฐฐ์—ด์€ ์ด์ƒํ•˜๊ฒŒ ์ ์šฉ์ด ์•ˆ๋๋‹ค.. ์ด ๋ถ€๋ถ„์—์„œ ์ข€ ํ—ค๋งค๋‹ค๊ฐ€ JSON.stringify์™€ JSON.parse๋กœ ํ•ด๊ฒฐํ–ˆ๋‹ค.


๐Ÿ”ฅ To Do


  • [๋ถ€์ŠคํŠธ์ฝ”์Šค] project B
  • [Algorithm] javaScript ๋งค์ผ 1๋ฌธ์ œ ์ด์ƒ ํ’€๊ธฐ
  • [๋ถ€์ŠคํŠธ์ฝ”์Šค] CS ์ž๋ฃŒ๊ตฌ์กฐ, ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๊ฐ•์˜