From a0dce0d06b2b2f45ae735e4c1373d78d858154c9 Mon Sep 17 00:00:00 2001 From: Climier-code Date: Thu, 17 Jun 2021 00:06:17 +0900 Subject: [PATCH] Fix NewsList with scroll & MainPage GotoStockPage at time & Header opacity --- src/api/news.ts | 2 +- src/components/News/NewsList.tsx | 7 +++++++ src/containers/Header.tsx | 2 +- src/containers/Main.tsx | 4 +++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/api/news.ts b/src/api/news.ts index 2fec73a..a05a878 100644 --- a/src/api/news.ts +++ b/src/api/news.ts @@ -3,7 +3,7 @@ import {NewsAPIKEY} from '../key/apikey'; export async function getNews(national:string) { const response = await axios.get( - `https://newsapi.org/v2/top-headlines?country=${national}&category=business&pageSize=6&apiKey=${NewsAPIKEY}` + `https://newsapi.org/v2/top-headlines?country=${national}&category=business&apiKey=${NewsAPIKEY}` ); return response.data; diff --git a/src/components/News/NewsList.tsx b/src/components/News/NewsList.tsx index 0754242..4443d03 100644 --- a/src/components/News/NewsList.tsx +++ b/src/components/News/NewsList.tsx @@ -11,6 +11,13 @@ const NewsListBlock = styled.div` box-shadow: 0.5rem 0.5rem; padding: 1rem; margin-right: 0.5rem; + + @media (min-width: 768px) { + height: 50rem; + + overflow-y: auto; + + } `; type NewsListProps = { diff --git a/src/containers/Header.tsx b/src/containers/Header.tsx index 64e4284..e84ae9d 100644 --- a/src/containers/Header.tsx +++ b/src/containers/Header.tsx @@ -45,7 +45,7 @@ const CategoriesBeforeBlock = styled.div` align-items: center; justify-content: center; flex-direction: column; - opacity:0.3; + opacity:0.6; @media screen and (max-width: 768px) { top: 0; diff --git a/src/containers/Main.tsx b/src/containers/Main.tsx index 7be1ab5..06705f0 100644 --- a/src/containers/Main.tsx +++ b/src/containers/Main.tsx @@ -64,7 +64,9 @@ function Main () { if (nowHour === 23 && 30 <= moment().minute()){ setTimecase(4) } - setTimecase(3) + else { + setTimecase(3) + } } else { setTimecase(4)