mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 15:21:48 +03:00
Fix media click handler not "refreshing"
This commit is contained in:
parent
3524eb84c3
commit
04b3fd9545
1 changed files with 11 additions and 8 deletions
|
@ -610,14 +610,17 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
|
||||
const initialPageState = useRef(showMedia ? 'media+status' : 'status');
|
||||
|
||||
const handleMediaClick = useCallback((e, i, media, status) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
setSearchParams({
|
||||
media: i + 1,
|
||||
mediaStatusID: status.id,
|
||||
});
|
||||
}, []);
|
||||
const handleMediaClick = useCallback(
|
||||
(e, i, media, status) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
setSearchParams({
|
||||
media: i + 1,
|
||||
mediaStatusID: status.id,
|
||||
});
|
||||
},
|
||||
[id],
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
Loading…
Add table
Reference in a new issue