1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-19 23:53:24 +02:00

Improve personalize popup

This commit is contained in:
Kamran Ahmed
2025-07-29 22:25:06 +01:00
parent 23a23d18c7
commit ed0ac20592
3 changed files with 13 additions and 7 deletions

View File

@@ -35,10 +35,11 @@ export function PersonalizedRoadmap(props: PersonalizedRoadmapProps) {
queryClient,
);
const { data: userProgress, refetch: refetchUserProgress } = useQuery(
userResourceProgressOptions('roadmap', roadmapId),
queryClient,
);
const {
data: userProgress,
isLoading: isUserProgressLoading,
refetch: refetchUserProgress,
} = useQuery(userResourceProgressOptions('roadmap', roadmapId), queryClient);
useEffect(() => {
if (userProgress?.personalized) {
@@ -207,7 +208,7 @@ export function PersonalizedRoadmap(props: PersonalizedRoadmapProps) {
/>
) : (
<button
className="group inline-flex items-center gap-1.5 border-b-2 border-b-transparent px-2 pb-2.5 text-sm font-normal text-gray-500 transition-colors hover:text-black"
className="group hidden sm:inline-flex items-center gap-1.5 border-b-2 border-b-transparent pb-2.5 text-sm font-normal text-gray-500 transition-colors hover:text-black"
onClick={() => {
if (!isLoggedIn()) {
showLoginPopup();

View File

@@ -43,7 +43,12 @@ export function PersonalizedRoadmapModal(props: PersonalizedRoadmapModalProps) {
}
return (
<Modal onClose={onClose} bodyClassName="rounded-2xl">
<Modal
onClose={onClose}
wrapperClassName="h-auto"
overlayClassName="items-start md:items-center"
bodyClassName="rounded-2xl"
>
<form onSubmit={handleSubmit} className="p-4">
<h2 className="text-lg font-semibold">Personalize Roadmap</h2>
<div className="mt-0.5 flex flex-col gap-2">

View File

@@ -69,7 +69,7 @@ export function PersonalizedRoadmapSwitcher(
</div>
)}
</div>
<div className="flex">
<div className="flex bg-gray-200 rounded-full">
<button
className={cn(
'rounded-full px-2.5 py-1 text-xs font-medium transition-all',