mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 20:52:00 +08:00
[resumes][fix] fix tooltip
This commit is contained in:
@ -12,9 +12,9 @@ export default function ResumeUserBadge({
|
|||||||
title,
|
title,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
return (
|
return (
|
||||||
<div className="group flex items-center justify-center">
|
<div className="group relative flex items-center justify-center">
|
||||||
<div
|
<div
|
||||||
className="absolute -top-0 hidden w-64 -translate-y-full flex-col
|
className="absolute -top-3 hidden w-48 -translate-y-full flex-col
|
||||||
justify-center gap-1 rounded-lg bg-white px-2 py-2 text-center drop-shadow-xl
|
justify-center gap-1 rounded-lg bg-white px-2 py-2 text-center drop-shadow-xl
|
||||||
after:absolute after:left-1/2 after:top-[100%] after:-translate-x-1/2
|
after:absolute after:left-1/2 after:top-[100%] after:-translate-x-1/2
|
||||||
after:border-8 after:border-x-transparent after:border-b-transparent
|
after:border-8 after:border-x-transparent after:border-b-transparent
|
||||||
|
@ -22,7 +22,7 @@ export default function ResumeUserBadges({ userId }: Props) {
|
|||||||
const payload: BadgePayload = {
|
const payload: BadgePayload = {
|
||||||
maxResumeUpvoteCount: userMaxResumeUpvoteCountQuery.data ?? 0,
|
maxResumeUpvoteCount: userMaxResumeUpvoteCountQuery.data ?? 0,
|
||||||
reviewedResumesCount: userReviewedResumeCountQuery.data ?? 0,
|
reviewedResumesCount: userReviewedResumeCountQuery.data ?? 0,
|
||||||
topUpvotedCommentCount: 10,
|
topUpvotedCommentCount: 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -90,7 +90,7 @@ export const RESUME_USER_BADGES: Array<BadgeInfo> = [
|
|||||||
id: 'Sage',
|
id: 'Sage',
|
||||||
isValid: (payload: BadgePayload) =>
|
isValid: (payload: BadgePayload) =>
|
||||||
payload.topUpvotedCommentCount >= TIER_THREE,
|
payload.topUpvotedCommentCount >= TIER_THREE,
|
||||||
title: 'I am wisdom.',
|
title: 'I am wisdom',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: `${TIER_TWO} top upvoted comment`,
|
description: `${TIER_TWO} top upvoted comment`,
|
||||||
|
@ -184,3 +184,13 @@ export const resumesRouter = createRouter()
|
|||||||
return highestUpvotedResume?._count?.stars ?? 0;
|
return highestUpvotedResume?._count?.stars ?? 0;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// .query('findUserTopUpvotedCommentCount', {
|
||||||
|
// input: z.object({
|
||||||
|
// userId: z.string(),
|
||||||
|
// }),
|
||||||
|
// async resolve({ ctx, input }) {
|
||||||
|
// const highestUpvotedResume = await ctx.prisma.resumesComment.groupBy({
|
||||||
|
// by: ['resumeId'],
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
Reference in New Issue
Block a user