mirror of
https://github.com/nickzuber/meteorite.git
synced 2024-09-11 11:36:03 +03:00
Hook in some action buttons
This commit is contained in:
parent
1d73c9fc10
commit
8215891c53
@ -698,7 +698,7 @@ export default function Scene ({
|
||||
// onClearQuery,
|
||||
// onLogout,
|
||||
// onSearch,
|
||||
// onMarkAsRead,
|
||||
onMarkAsRead,
|
||||
// onMarkAllAsStaged,
|
||||
// onFetchNotifications,
|
||||
// onStageThread,
|
||||
@ -742,6 +742,7 @@ export default function Scene ({
|
||||
loading={loading}
|
||||
isFirstPage={isFirstPage}
|
||||
isLastPage={isLastPage}
|
||||
onArchiveThread={onMarkAsRead}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
@ -99,9 +99,6 @@ function getMessageFromReasons (reasons, type) {
|
||||
return 'Something was updated';
|
||||
}
|
||||
}
|
||||
// ========================================================================
|
||||
// END OF 'MOVE TO A UTILS FILE'
|
||||
// ========================================================================
|
||||
|
||||
function createColorOfScore (min, max) {
|
||||
return function (score) {
|
||||
@ -119,6 +116,10 @@ function createColorOfScore (min, max) {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================================================
|
||||
// END OF 'MOVE TO A UTILS FILE'
|
||||
// ========================================================================
|
||||
|
||||
const loadingKeyframe = keyframes`
|
||||
100% {
|
||||
transform: translateX(100%);
|
||||
@ -736,8 +737,8 @@ export default function Scene ({
|
||||
onClearCache,
|
||||
setNotificationsPermission,
|
||||
onStageThread,
|
||||
onArchiveThread,
|
||||
}) {
|
||||
console.warn('unreadCount', unreadCount)
|
||||
const [menuOpen, setMenuOpen] = React.useState(false);
|
||||
const [dropdownOpen, setDropdownOpen] = React.useState(false);
|
||||
const [mode, setMode] = React.useState(Mode.ALL);
|
||||
@ -1121,7 +1122,8 @@ export default function Scene ({
|
||||
notifications={notifications}
|
||||
page={page}
|
||||
colorOfScore={createColorOfScore(lowestScore, highestScore)}
|
||||
onTitleClick={onStageThread}
|
||||
markAsRead={onStageThread}
|
||||
markAsArchived={onArchiveThread}
|
||||
/>
|
||||
)}
|
||||
</NotificationsTable>
|
||||
@ -1135,7 +1137,8 @@ export default function Scene ({
|
||||
function NotificationCollection ({
|
||||
notifications,
|
||||
colorOfScore,
|
||||
onTitleClick,
|
||||
markAsRead,
|
||||
markAsArchived,
|
||||
page
|
||||
}) {
|
||||
const props = useSpring({
|
||||
@ -1159,7 +1162,7 @@ function NotificationCollection ({
|
||||
flex={4}
|
||||
onClick={() => {
|
||||
window.open(item.url);
|
||||
onTitleClick(item.id, item.repository);
|
||||
markAsRead(item.id, item.repository);
|
||||
}}
|
||||
css={css`
|
||||
font-weight: 500;
|
||||
@ -1198,10 +1201,10 @@ function NotificationCollection ({
|
||||
width: 40px;
|
||||
}
|
||||
`}>
|
||||
<IconLink>
|
||||
<IconLink onClick={() => markAsRead(item.id, item.repository)}>
|
||||
<i className="fas fa-check"></i>
|
||||
</IconLink>
|
||||
<IconLink>
|
||||
<IconLink onClick={() => markAsArchived(item.id, item.repository)}>
|
||||
<i className="fas fa-times"></i>
|
||||
</IconLink>
|
||||
</NotificationCell>
|
||||
|
Loading…
Reference in New Issue
Block a user