Skip to content

Commit

Permalink
Some coloring in tables next
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetkuzuTalebe committed Jun 4, 2023
1 parent ccba5f7 commit d608557
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
22 changes: 18 additions & 4 deletions practice-app/client/pages/on-twitter-listevents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,22 @@ const ListAllTweets: NextPage = () => {
retValAll.push(<div><a href={retval}>{eachTwit}</a></div>);
}
return retValAll;
}
else {
} else if (columnKey == "event_summary") {
let arrSummaries = item[columnKey];
let retValAll = [];
let firstLine = true;
for (const summ of arrSummaries) {
let retval = summ;
if (firstLine) {
firstLine = false;
} else {
retval = "-> " + retval;
}

retValAll.push(<div>{retval}</div>);
}
return retValAll;
} else {
return item[columnKey];
}
}
Expand All @@ -178,7 +192,7 @@ const ListAllTweets: NextPage = () => {
css={{
height: "auto",
minWidth: "100%",
whiteSpace: "normal",
//whiteSpace: "normal",
}}
>
<Table.Header columns={columns}>
Expand All @@ -192,7 +206,7 @@ const ListAllTweets: NextPage = () => {
{(columnKey) => <Table.Cell css={{
height: "auto",
minWidth: "100%",
whiteSpace: "break-spaces",
//whiteSpace: "break-spaces",
}}
>{insertLinkIfNeeded(columnKey,item)}</Table.Cell>}
</Table.Row>
Expand Down
2 changes: 1 addition & 1 deletion practice-app/client/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ body {
}

tr:nth-child(even) {
background-color: lightcyan;
background-color: aliceblue;
}

tr:nth-child(odd) {
Expand Down
4 changes: 2 additions & 2 deletions practice-app/server/routers/on_twitter/twitterFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def getEvents(self):
related_twits = f'{related_twits}{related_tw}\n'

ret_value.append({'key':key,
'event_date': event_date,
'event_summary': event_summary,
'event_date': event_date.strftime("%m/%d/%Y %H:%M"),
'event_summary': event_summary_list,
'related_twits': related_twits_list,
'verified': verified,
'event_id': event_id
Expand Down

0 comments on commit d608557

Please sign in to comment.