Skip to content

Commit

Permalink
fix: copy media link (#1750)
Browse files Browse the repository at this point in the history
Co-authored-by: Meier Lukas <[email protected]>
  • Loading branch information
manuel-rw and Meierschlumpf authored Dec 22, 2024
1 parent 210ce36 commit d78c6ed
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ interface CopyMediaProps {
export const CopyMedia = ({ media }: CopyMediaProps) => {
const t = useI18n();

const url =
typeof window !== "undefined"
? `${window.location.protocol}://${window.location.hostname}:${window.location.port}/api/user-medias/${media.id}`
: "";
const url = typeof window !== "undefined" ? `${window.location.origin}/api/user-medias/${media.id}` : "";

return (
<CopyButton value={url}>
Expand Down

0 comments on commit d78c6ed

Please sign in to comment.