Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonma committed Jul 22, 2022
2 parents 4e490de + ba70fc3 commit b324e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/ShareLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useTranslation } from "next-i18next"
import { useEffect, useState } from "react"
import useSWR from "swr"
import fetcher from "../src/utils/fetcher"
import getSharePrefix from "../src/utils/getSharePrefix"
import useSharePrefix from "../src/useSharePrefix"

const useShortLink = (url: string) => {
const { data, error } = useSWR(`/api/shorten?url=${url}`, fetcher)
Expand All @@ -35,7 +35,7 @@ const ShareLink = () => {

const id = router.query.id

const sharePrefix = getSharePrefix()
const [sharePrefix] = useSharePrefix()
const fullUrl = `${sharePrefix}${id}`

const [urlToShare, setUrlToShare] = useState(fullUrl)
Expand Down
4 changes: 2 additions & 2 deletions components/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { DUPLICATE_TIMETABLE } from "../operations/mutations/duplicateTimetable"
import { ExternalLinkIcon } from "@chakra-ui/icons"
import { useTranslation } from "next-i18next"
import ShareLink from "./ShareLink"
import getSharePrefix from "../src/utils/getSharePrefix"
import useSharePrefix from "../src/useSharePrefix"

type Props = {
isOpen: boolean
Expand All @@ -37,7 +37,7 @@ const ShareModal = ({ isOpen, onClose }: Props) => {

const id = router.query.id

const sharePrefix = getSharePrefix()
const [sharePrefix] = useSharePrefix()

const [duplicateTimetable] = useMutation(DUPLICATE_TIMETABLE)

Expand Down

0 comments on commit b324e2a

Please sign in to comment.