Merge branch 'main' of github.com:yangshun/tech-interview-handbook

* 'main' of github.com:yangshun/tech-interview-handbook:
  [resumes][feat] use overflow-auto instead
  [resumes][fix] invalidate fetch query on submit
  [resumes][fix] fix reply comments (#407)
pull/413/head
Bryann Yeap Kok Keong 2 years ago
commit f8d22632ec

@ -96,15 +96,17 @@ export default function ResumeCommentListItem({
<div className="flex flex-row space-x-1 pt-1 align-middle">
<ResumeCommentVoteButtons commentId={comment.id} userId={userId} />
{/* Action buttons; only present when not editing/replying */}
{isCommentOwner && !isEditingComment && !isReplyingComment && (
{/* Action buttons; only present for authenticated user when not editing/replying */}
{userId && !isEditingComment && !isReplyingComment && (
<>
<button
className="px-1 text-xs text-indigo-800 hover:text-indigo-400"
type="button"
onClick={() => setIsEditingComment(true)}>
Edit
</button>
{isCommentOwner && (
<button
className="px-1 text-xs text-indigo-800 hover:text-indigo-400"
type="button"
onClick={() => setIsEditingComment(true)}>
Edit
</button>
)}
{!comment.parentId && (
<button

@ -361,7 +361,7 @@ export default function ResumeHomePage() {
</Transition.Root>
</div>
<main className="h-[calc(100vh-4rem)] flex-1 overflow-y-scroll">
<main className="h-[calc(100vh-4rem)] flex-1 overflow-y-auto">
<div className="ml-4 py-4">
<ResumeReviewsTitle />
</div>

@ -80,6 +80,7 @@ export default function SubmitResumeForm({
const { data: session, status } = useSession();
const router = useRouter();
const trpcContext = trpc.useContext();
const resumeUpsertMutation = trpc.useMutation('resumes.resume.user.upsert');
const isNewForm = initFormDetails == null;
@ -170,6 +171,7 @@ export default function SubmitResumeForm({
},
onSuccess() {
if (isNewForm) {
trpcContext.invalidateQueries('resumes.resume.findAll');
router.push('/resumes/browse');
} else {
onClose();
@ -228,7 +230,7 @@ export default function SubmitResumeForm({
<Head>
<title>Upload a Resume</title>
</Head>
<main className="h-[calc(100vh-4rem)] flex-1 overflow-y-scroll">
<main className="h-[calc(100vh-4rem)] flex-1 overflow-y-auto">
<section
aria-labelledby="primary-heading"
className="flex h-full min-w-0 flex-1 flex-col lg:order-last">

Loading…
Cancel
Save