mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 02:22:12 +03:00
notifications: refactor inbox to match spec
This commit is contained in:
parent
801ccdad6f
commit
3bd1e06f0f
@ -121,7 +121,7 @@ export default function Inbox(props: {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col ref={scrollRef} position="relative" height="100%" overflowY="auto">
|
<Col p="1" ref={scrollRef} position="relative" height="100%" overflowY="auto">
|
||||||
<Invites pendingJoin={props.pendingJoin} api={api} />
|
<Invites pendingJoin={props.pendingJoin} api={api} />
|
||||||
{[...notificationsByDayMap.keys()].sort().reverse().map((day, index) => {
|
{[...notificationsByDayMap.keys()].sort().reverse().map((day, index) => {
|
||||||
const timeboxes = notificationsByDayMap.get(day)!;
|
const timeboxes = notificationsByDayMap.get(day)!;
|
||||||
@ -175,26 +175,15 @@ function DaySection({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box position="sticky" zIndex={3} top="-1px" bg="white">
|
|
||||||
<Box p="2" bg="scales.black05">
|
|
||||||
<Text>
|
|
||||||
{label}
|
|
||||||
</Text>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
{_.map(timeboxes.sort(sortTimeboxes), ([date, nots], i: number) =>
|
{_.map(timeboxes.sort(sortTimeboxes), ([date, nots], i: number) =>
|
||||||
_.map(nots.sort(sortIndexedNotification), (not, j: number) => (
|
_.map(nots.sort(sortIndexedNotification), (not, j: number) => (
|
||||||
<React.Fragment key={j}>
|
<Notification
|
||||||
{(i !== 0 || j !== 0) && (
|
key={j}
|
||||||
<Box flexShrink={0} height="4px" bg="scales.black05" />
|
api={api}
|
||||||
)}
|
notification={not}
|
||||||
<Notification
|
archived={archive}
|
||||||
api={api}
|
time={date}
|
||||||
notification={not}
|
/>
|
||||||
archived={archive}
|
|
||||||
time={date}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user