Fix bug where setting share password would print error
This solves #133
This commit is contained in:
parent
514d9b1c2d
commit
d7ed03ca4f
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue