[offers][fix] fix create commnet and update title

pull/422/head
Zhang Ziqing 3 years ago
parent c188405de0
commit 614356c600

@ -7,7 +7,7 @@ const navigation: ProductNavigationItems = [
const config = {
navigation,
showGlobalNav: false,
title: 'Tech Offers Repo',
title: 'Offer Profile Repository',
titleHref: '/offers',
};

@ -3,14 +3,14 @@ export default function OffersTitle() {
<>
<div className="flex items-end justify-center">
<h1 className="text-primary-600 mt-16 text-center text-4xl font-bold">
Tech Handbook Offers Repo
Offer Profile Repository
</h1>
</div>
<div className="text-primary-500 mt-2 text-center text-2xl font-normal">
Reveal profile stories behind offers
</div>
<div className="items-top flex justify-center text-xl font-normal">
Benchmark your offers and profiles, learn from other's offer profile,
Click into offers to view profiles, benchmark your offers and profiles,
and discuss with the community
</div>
</>

@ -154,7 +154,11 @@ export default function ProfileComments({
<div className="mt-2 flex w-full justify-end">
<div className="w-fit">
<Button
disabled={commentsQuery.isLoading || !currentReply.length}
disabled={
commentsQuery.isLoading ||
!currentReply.length ||
createCommentMutation.isLoading
}
display="block"
isLabelHidden={false}
isLoading={createCommentMutation.isLoading}

@ -128,7 +128,7 @@ export default function CommentCard({
<TextArea
isLabelHidden={true}
label="Comment"
placeholder="Type your comment here"
placeholder="Type your reply here"
resize="none"
value={currentReply}
onChange={(value) => setCurrentReply(value)}
@ -136,7 +136,9 @@ export default function CommentCard({
<div className="mt-2 flex w-full justify-end">
<div className="w-fit">
<Button
disabled={!currentReply.length}
disabled={
!currentReply.length || createCommentMutation.isLoading
}
display="block"
isLabelHidden={false}
isLoading={createCommentMutation.isLoading}

@ -25,9 +25,11 @@ export function timeSinceNow(date: Date | number | string) {
}
interval = seconds / 60;
if (interval > 1) {
return `${Math.floor(interval)} minutes`;
const time: number = Math.floor(interval);
return time === 1 ? `${time} minute` : `${time} minutes`;
}
return `${Math.floor(interval)} seconds`;
const time: number = Math.floor(interval);
return time === 1 ? `${time} second` : `${time} seconds`;
}
export function formatDate(value: Date | number | string) {

Loading…
Cancel
Save