fix: Fixes first Keryword Error cut off issue.

This commit is contained in:
towfiqi
2023-03-29 20:11:56 +06:00
parent 9757fde02e
commit d9505158c4
2 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import { generateTheChartData } from '../common/generateChartData';
type KeywordProps = {
keywordData: KeywordType,
selected: boolean,
index: number,
refreshkeyword: Function,
favoriteKeyword: Function,
removeKeyword: Function,
@@ -34,6 +35,7 @@ const Keyword = (props: KeywordProps) => {
lastItem,
showSCData = true,
style,
index,
scDataType = 'threeDays',
} = props;
const {
@@ -175,7 +177,8 @@ const Keyword = (props: KeywordProps) => {
)}
</div>
{lastUpdateError && lastUpdateError.date && showPositionError && (
<div className=' absolute mt-[-70px] p-2 bg-white z-30 border border-red-200 rounded w-[220px] left-4 shadow-sm text-xs lg:bottom-12'>
<div className={`absolute p-2 bg-white z-30 border border-red-200 rounded w-[220px] left-4 shadow-sm text-xs
${index > 2 ? 'lg:bottom-12 mt-[-70px]' : ' top-12'}`}>
Error Updating Keyword position (Tried <TimeAgo
title={dayjs(lastUpdateError.date).format('DD-MMM-YYYY, hh:mm:ss A')}
date={lastUpdateError.date} />)

View File

@@ -86,6 +86,7 @@ const KeywordsTable = (props: KeywordsTableProps) => {
<Keyword
key={keyword.ID}
style={style}
index={index}
selected={selectedKeywords.includes(keyword.ID)}
selectKeyword={selectKeyword}
keywordData={keyword}