[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 = { const config = {
navigation, navigation,
showGlobalNav: false, showGlobalNav: false,
title: 'Tech Offers Repo', title: 'Offer Profile Repository',
titleHref: '/offers', titleHref: '/offers',
}; };

@ -3,14 +3,14 @@ export default function OffersTitle() {
<> <>
<div className="flex items-end justify-center"> <div className="flex items-end justify-center">
<h1 className="text-primary-600 mt-16 text-center text-4xl font-bold"> <h1 className="text-primary-600 mt-16 text-center text-4xl font-bold">
Tech Handbook Offers Repo Offer Profile Repository
</h1> </h1>
</div> </div>
<div className="text-primary-500 mt-2 text-center text-2xl font-normal"> <div className="text-primary-500 mt-2 text-center text-2xl font-normal">
Reveal profile stories behind offers Reveal profile stories behind offers
</div> </div>
<div className="items-top flex justify-center text-xl font-normal"> <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 and discuss with the community
</div> </div>
</> </>

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

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

@ -25,9 +25,11 @@ export function timeSinceNow(date: Date | number | string) {
} }
interval = seconds / 60; interval = seconds / 60;
if (interval > 1) { 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) { export function formatDate(value: Date | number | string) {

Loading…
Cancel
Save