mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-23 14:13:21 +01:00
Enable boosts carousel for public timelines too
This commit is contained in:
parent
07edae4cc3
commit
a9412609cf
1 changed files with 4 additions and 0 deletions
|
@ -1,15 +1,18 @@
|
||||||
import { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu';
|
import { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu';
|
||||||
import { useRef } from 'preact/hooks';
|
import { useRef } from 'preact/hooks';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
|
import { useSnapshot } from 'valtio';
|
||||||
|
|
||||||
import Icon from '../components/icon';
|
import Icon from '../components/icon';
|
||||||
import Timeline from '../components/timeline';
|
import Timeline from '../components/timeline';
|
||||||
import { api } from '../utils/api';
|
import { api } from '../utils/api';
|
||||||
|
import states from '../utils/states';
|
||||||
import useTitle from '../utils/useTitle';
|
import useTitle from '../utils/useTitle';
|
||||||
|
|
||||||
const LIMIT = 20;
|
const LIMIT = 20;
|
||||||
|
|
||||||
function Public({ local, ...props }) {
|
function Public({ local, ...props }) {
|
||||||
|
const snapStates = useSnapshot(states);
|
||||||
const isLocal = !!local;
|
const isLocal = !!local;
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const { masto, instance } = api({
|
const { masto, instance } = api({
|
||||||
|
@ -74,6 +77,7 @@ function Public({ local, ...props }) {
|
||||||
fetchItems={fetchPublic}
|
fetchItems={fetchPublic}
|
||||||
checkForUpdates={checkForUpdates}
|
checkForUpdates={checkForUpdates}
|
||||||
headerStart={<></>}
|
headerStart={<></>}
|
||||||
|
boostsCarousel={snapStates.settings.boostsCarousel}
|
||||||
headerEnd={
|
headerEnd={
|
||||||
<Menu
|
<Menu
|
||||||
portal={{
|
portal={{
|
||||||
|
|
Loading…
Add table
Reference in a new issue