mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 12:43:12 +08:00
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)
This commit is contained in:
@ -96,15 +96,17 @@ export default function ResumeCommentListItem({
|
|||||||
<div className="flex flex-row space-x-1 pt-1 align-middle">
|
<div className="flex flex-row space-x-1 pt-1 align-middle">
|
||||||
<ResumeCommentVoteButtons commentId={comment.id} userId={userId} />
|
<ResumeCommentVoteButtons commentId={comment.id} userId={userId} />
|
||||||
|
|
||||||
{/* Action buttons; only present when not editing/replying */}
|
{/* Action buttons; only present for authenticated user when not editing/replying */}
|
||||||
{isCommentOwner && !isEditingComment && !isReplyingComment && (
|
{userId && !isEditingComment && !isReplyingComment && (
|
||||||
<>
|
<>
|
||||||
|
{isCommentOwner && (
|
||||||
<button
|
<button
|
||||||
className="px-1 text-xs text-indigo-800 hover:text-indigo-400"
|
className="px-1 text-xs text-indigo-800 hover:text-indigo-400"
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setIsEditingComment(true)}>
|
onClick={() => setIsEditingComment(true)}>
|
||||||
Edit
|
Edit
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
{!comment.parentId && (
|
{!comment.parentId && (
|
||||||
<button
|
<button
|
||||||
|
@ -361,7 +361,7 @@ export default function ResumeHomePage() {
|
|||||||
</Transition.Root>
|
</Transition.Root>
|
||||||
</div>
|
</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">
|
<div className="ml-4 py-4">
|
||||||
<ResumeReviewsTitle />
|
<ResumeReviewsTitle />
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,6 +80,7 @@ export default function SubmitResumeForm({
|
|||||||
|
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const trpcContext = trpc.useContext();
|
||||||
const resumeUpsertMutation = trpc.useMutation('resumes.resume.user.upsert');
|
const resumeUpsertMutation = trpc.useMutation('resumes.resume.user.upsert');
|
||||||
const isNewForm = initFormDetails == null;
|
const isNewForm = initFormDetails == null;
|
||||||
|
|
||||||
@ -170,6 +171,7 @@ export default function SubmitResumeForm({
|
|||||||
},
|
},
|
||||||
onSuccess() {
|
onSuccess() {
|
||||||
if (isNewForm) {
|
if (isNewForm) {
|
||||||
|
trpcContext.invalidateQueries('resumes.resume.findAll');
|
||||||
router.push('/resumes/browse');
|
router.push('/resumes/browse');
|
||||||
} else {
|
} else {
|
||||||
onClose();
|
onClose();
|
||||||
@ -228,7 +230,7 @@ export default function SubmitResumeForm({
|
|||||||
<Head>
|
<Head>
|
||||||
<title>Upload a Resume</title>
|
<title>Upload a Resume</title>
|
||||||
</Head>
|
</Head>
|
||||||
<main className="h-[calc(100vh-4rem)] flex-1 overflow-y-scroll">
|
<main className="h-[calc(100vh-4rem)] flex-1 overflow-y-auto">
|
||||||
<section
|
<section
|
||||||
aria-labelledby="primary-heading"
|
aria-labelledby="primary-heading"
|
||||||
className="flex h-full min-w-0 flex-1 flex-col lg:order-last">
|
className="flex h-full min-w-0 flex-1 flex-col lg:order-last">
|
||||||
|
Reference in New Issue
Block a user