Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedCodeGuy committed Feb 24, 2025
1 parent 42935ef commit f936b99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/MediaMaker/RenderControls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import layoutStyle from '@/pages/index.module.scss';
import PreviewMode from '@/types/Media/PreviewMode';
import { shortenUrl } from '@/utils/auth/api';
import { logButtonClick } from '@/utils/eventLogger';
import { getQuranMediaMakerNavigationUrl } from '@/utils/navigation';
import { getBasePath, getCurrentPath } from '@/utils/url';

type Props = {
Expand Down Expand Up @@ -56,7 +57,9 @@ const RenderControls: React.FC<Props> = ({ inputProps, isFetching, playerRef })
const path = getCurrentPath();
const response = await shortenUrl(`${path}&previewMode=${PreviewMode.ENABLED}`);

const url = response?.id ? `${getBasePath()}/media/${response.id}` : path;
const url = response?.id
? `${getBasePath()}${getQuranMediaMakerNavigationUrl()}/${response.id}`
: path;
if (url) {
clipboardCopy(url).then(() => {
setIsCopied(true);
Expand Down

0 comments on commit f936b99

Please sign in to comment.