Merge branch 'oakes/follow-hashtag' into 'develop'

Fix "follow hashtag" toggle

See merge request soapbox-pub/soapbox!2638
This commit is contained in:
Alex Gleason 2023-08-02 22:44:24 +00:00
commit fd74551fad
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ interface IToggle extends Pick<React.InputHTMLAttributes<HTMLInputElement>, 'id'
} }
/** A glorified checkbox. */ /** A glorified checkbox. */
const Toggle: React.FC<IToggle> = ({ id, size = 'md', name, checked, onChange, required, disabled }) => { const Toggle: React.FC<IToggle> = ({ id, size = 'md', name, checked = false, onChange, required, disabled }) => {
const input = useRef<HTMLInputElement>(null); const input = useRef<HTMLInputElement>(null);
const handleClick: React.MouseEventHandler<HTMLButtonElement> = () => { const handleClick: React.MouseEventHandler<HTMLButtonElement> = () => {

View file

@ -41,7 +41,7 @@ export const HashtagTimeline: React.FC<IHashtagTimeline> = ({ params }) => {
useEffect(() => { useEffect(() => {
dispatch(expandHashtagTimeline(id)); dispatch(expandHashtagTimeline(id));
dispatch(fetchHashtag(id)); dispatch(fetchHashtag(id));
}, []); }, [id]);
useEffect(() => { useEffect(() => {
dispatch(clearTimeline(`hashtag:${id}`)); dispatch(clearTimeline(`hashtag:${id}`));