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:
@@ -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();
|
||||||
|
@@ -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">
|
||||||
|
@@ -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',
|
||||||
|
Reference in New Issue
Block a user