feat/user-modal
Kamran Ahmed 1 year ago
parent a7752e6621
commit 4e0f7e3a3a
  1. 3
      src/components/UserProgress/ProgressShareButton.tsx
  2. 7
      src/components/UserProgress/UserProgressModal.tsx

@ -1,6 +1,5 @@
import { useAuth } from '../../hooks/use-auth';
import { useCopyText } from '../../hooks/use-copy-text';
import { useToast } from '../../hooks/use-toast';
import type { ResourceType } from '../../lib/resource-progress';
import { CheckIcon } from '../ReactIcons/CheckIcon';
import { ShareIcon } from '../ReactIcons/ShareIcon';
@ -23,7 +22,6 @@ export function ProgressShareButton(props: ProgressShareButtonProps) {
const user = useAuth();
const { copyText, isCopied } = useCopyText();
const toast = useToast();
function handleCopyLink() {
const isDev = import.meta.env.DEV;
@ -39,7 +37,6 @@ export function ProgressShareButton(props: ProgressShareButtonProps) {
newUrl.searchParams.set('s', user?.id || '');
copyText(newUrl.toString());
toast.success('Progress link copied to clipboard.');
}
if (!user) {

@ -5,15 +5,11 @@ import { useOutsideClick } from '../../hooks/use-outside-click';
import { useKeydown } from '../../hooks/use-keydown';
import { httpGet } from '../../lib/http';
import type { ResourceType } from '../../lib/resource-progress';
import { topicSelectorAll } from '../../lib/resource-progress';
import CloseIcon from '../../icons/close.svg';
import { useToast } from '../../hooks/use-toast';
import { deleteUrlParam, getUrlParams } from '../../lib/browser';
import { useAuth } from '../../hooks/use-auth';
import { Spinner } from '../ReactIcons/Spinner';
import {
renderTopicProgress,
topicSelectorAll,
} from '../../lib/resource-progress';
import { ErrorIcon } from '../ReactIcons/ErrorIcon';
export type ProgressMapProps = {
@ -54,7 +50,6 @@ export function UserProgressModal(props: ProgressMapProps) {
const [isLoading, setIsLoading] = useState(true);
const [error, setError] = useState('');
const toast = useToast();
let resourceJsonUrl = import.meta.env.DEV
? 'http://localhost:3000'

Loading…
Cancel
Save