mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 22:19:07 +00:00
Fix bug where setting share password would print error
This solves #133
This commit is contained in:
@@ -176,6 +176,7 @@ const TokenRoute = ({ match }) => {
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
VALIDATE_TOKEN_PASSWORD_QUERY,
|
||||
{
|
||||
notifyOnNetworkStatusChange: true,
|
||||
variables: {
|
||||
token: match.params.token,
|
||||
password: getSharePassword(match.params.token),
|
||||
@@ -202,7 +203,7 @@ const TokenRoute = ({ match }) => {
|
||||
match={match}
|
||||
refetchWithPassword={password => {
|
||||
saveSharePassword(token, password)
|
||||
refetch({ variables: { password } })
|
||||
refetch({ token, password })
|
||||
}}
|
||||
loading={loading}
|
||||
/>
|
||||
|
||||
@@ -115,6 +115,7 @@ const ShareItemMoreDropdown = ({ id, share, isPhoto }) => {
|
||||
event.preventDefault()
|
||||
setPassword({
|
||||
variables: {
|
||||
token: share.token,
|
||||
password: event.target.value,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -179,7 +179,7 @@ const SidebarDownload = ({ photo }) => {
|
||||
let downloadRows = downloads.map(x => (
|
||||
<DownloadTableRow
|
||||
key={x.mediaUrl.url}
|
||||
onClick={() => downloadMedia(x.mediaUrl.url, photo.title)}
|
||||
onClick={() => downloadMedia(x.mediaUrl.url)}
|
||||
>
|
||||
<Table.Cell>{`${x.title}`}</Table.Cell>
|
||||
<Table.Cell>{`${x.mediaUrl.width} x ${x.mediaUrl.height}`}</Table.Cell>
|
||||
|
||||
Reference in New Issue
Block a user