Timeline - Link to subs
This commit is contained in:
parent
cfccd424cb
commit
2089ee4161
1 changed files with 74 additions and 61 deletions
|
|
@ -14,6 +14,7 @@ import {
|
|||
IconLock,
|
||||
IconX,
|
||||
} from "@tabler/icons-react";
|
||||
import { useUserContext } from "./UserContext";
|
||||
|
||||
const TIMELINE_TYPE = {
|
||||
ORDER_NOT_ISSUED: {
|
||||
|
|
@ -60,7 +61,10 @@ const TIMELINE_TYPE = {
|
|||
|
||||
export const TimelineList: React.FC<{
|
||||
timeline: TimelineEvent[];
|
||||
}> = ({ timeline }) => (
|
||||
}> = ({ timeline }) => {
|
||||
const { username: my_username } = useUserContext();
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Title order={1} mb="lg">
|
||||
Timeline
|
||||
|
|
@ -115,7 +119,15 @@ export const TimelineList: React.FC<{
|
|||
</Text>
|
||||
) : null}
|
||||
<Text size="xs">
|
||||
{username != my_username ? (
|
||||
<Anchor component={Link} to={`/orders/${username}`}>
|
||||
<IconLock size="0.75rem" /> {username}
|
||||
</Anchor>
|
||||
) : (
|
||||
<>
|
||||
<IconLock size="0.75rem" /> {username}
|
||||
</>
|
||||
)}
|
||||
</Text>
|
||||
<Text size="xs">{moment(updated_at).fromNow()}</Text>
|
||||
</Flex>
|
||||
|
|
@ -126,3 +138,4 @@ export const TimelineList: React.FC<{
|
|||
</Card>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue