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, queryClient,
); );
const { data: userProgress, refetch: refetchUserProgress } = useQuery( const {
userResourceProgressOptions('roadmap', roadmapId), data: userProgress,
queryClient, isLoading: isUserProgressLoading,
); refetch: refetchUserProgress,
} = useQuery(userResourceProgressOptions('roadmap', roadmapId), queryClient);
useEffect(() => { useEffect(() => {
if (userProgress?.personalized) { if (userProgress?.personalized) {
@@ -207,7 +208,7 @@ export function PersonalizedRoadmap(props: PersonalizedRoadmapProps) {
/> />
) : ( ) : (
<button <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={() => { onClick={() => {
if (!isLoggedIn()) { if (!isLoggedIn()) {
showLoginPopup(); showLoginPopup();

View File

@@ -43,7 +43,12 @@ export function PersonalizedRoadmapModal(props: PersonalizedRoadmapModalProps) {
} }
return ( 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"> <form onSubmit={handleSubmit} className="p-4">
<h2 className="text-lg font-semibold">Personalize Roadmap</h2> <h2 className="text-lg font-semibold">Personalize Roadmap</h2>
<div className="mt-0.5 flex flex-col gap-2"> <div className="mt-0.5 flex flex-col gap-2">

View File

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