fix protocol issue in query string

This commit is contained in:
lamacchinadesiderante 2023-01-11 19:56:24 +01:00
parent 8b6322d4cc
commit 43ffcc16b6
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ const Search: React.FC<SearchProps> = ({ setBooks }) => {
}
const copyToClipboard = () => {
const searchBase = `${window.location.host}/?`;
const searchBase = `${window.location.protocol}//${window.location.host}/?`;
const searchQuery = encodeURIComponent(`title=${title}&author=${author}&language=${language}&publisher=${publisher}&isbn=${isbn}&extension=${extension}`)
navigator.clipboard.writeText(`${searchBase}${searchQuery}`).then(() => {