diff --git a/src/features/Posts/Components/PostCard/PostCardHeader/PostCardHeader.tsx b/src/features/Posts/Components/PostCard/PostCardHeader/PostCardHeader.tsx
index 257c224..76f0893 100644
--- a/src/features/Posts/Components/PostCard/PostCardHeader/PostCardHeader.tsx
+++ b/src/features/Posts/Components/PostCard/PostCardHeader/PostCardHeader.tsx
@@ -17,10 +17,12 @@ export default function PostCardHeader(props: Props) {
const dateToShow = () => {
- const passedTime = dayjs().diff(props.date, 'hour');
- if (passedTime === 0) return 'now';
- if (passedTime < 24) return `${dayjs().diff(props.date, 'hour')}h ago`
- return dayjs(props.date).format('MMMM DD');
+ const passedTimeHrs = dayjs().diff(props.date, 'hour');
+ const passedTimesDays = Math.ceil(passedTimeHrs / 24);
+ if (passedTimeHrs === 0) return 'now';
+ if (passedTimeHrs < 24) return `${dayjs().diff(props.date, 'hour')}h ago`
+ if (passedTimesDays < 29) return `${passedTimesDays} days`
+ return dayjs(props.date).format('DD MMM');
}
if (!props.author) return null
@@ -29,10 +31,10 @@ export default function PostCardHeader(props: Props) {
)
diff --git a/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx b/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx
index 05314bb..d028aeb 100644
--- a/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx
+++ b/src/features/Posts/pages/PostDetailsPage/Components/StoryPageContent/StoryPageContent.tsx
@@ -7,10 +7,13 @@ import IconButton from "src/Components/IconButton/IconButton";
import { Menu, MenuItem } from "@szhsin/react-menu";
import { useAppSelector } from "src/utils/hooks";
import { useUpdateStory } from './useUpdateStory'
-import { FaPen } from "react-icons/fa";
import DOMPurify from 'dompurify';
import Card from "src/Components/Card/Card";
import PostPageHeader from "../PostPageHeader/PostPageHeader";
+import { FiEdit2, FiLink } from "react-icons/fi";
+import CopyToClipboard from "react-copy-to-clipboard";
+import { createRoute } from "src/utils/routing";
+import { NotificationsService } from "src/services";
interface Props {
@@ -30,33 +33,46 @@ export default function StoryPageContent({ story }: Props) {
<>
-
+
+
+
+
+ NotificationsService.info(" Copied share link to clipboard", { icon: "📋" })}
+ >
+
+
+
+
+ {curUser?.id === story.author.id &&
}
+
+
{story.cover_image &&
}
- {curUser?.id === story.author.id &&
}
+
{story.title}
{story.tags.length > 0 &&
{story.tags.map(tag =>
diff --git a/src/features/Profiles/pages/ProfilePage/SkillsCard/SkillsCard.tsx b/src/features/Profiles/pages/ProfilePage/SkillsCard/SkillsCard.tsx
index e937d72..5975fda 100644
--- a/src/features/Profiles/pages/ProfilePage/SkillsCard/SkillsCard.tsx
+++ b/src/features/Profiles/pages/ProfilePage/SkillsCard/SkillsCard.tsx
@@ -18,7 +18,7 @@ export default function SkillsCard({ skills, isOwner }: Props) {
No skills added
{isOwner && }
>}
-
+
{skills.map((skill) => - {skill.title}
)}