username -> acct

sw-index-revalidate
Justin 2022-06-27 10:44:16 -04:00
rodzic afabe9525d
commit 303ad10730
3 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -86,10 +86,10 @@ describe('<FeedCarousel />', () => {
__stub(mock => {
mock.onGet('/api/v1/truth/carousels/avatars')
.reply(200, [
{ account_id: '1', username: 'a', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '2', username: 'b', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '3', username: 'c', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '4', username: 'd', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '1', acct: 'a', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '2', acct: 'b', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '3', acct: 'c', account_avatar: 'https://example.com/some.jpg' },
{ account_id: '4', acct: 'd', account_avatar: 'https://example.com/some.jpg' },
]);
});

Wyświetl plik

@ -12,7 +12,7 @@ import PlaceholderAvatar from '../placeholder/components/placeholder_avatar';
const CarouselItem = ({ avatar }: { avatar: any }) => {
const dispatch = useAppDispatch();
const selectedAccountId = useAppSelector(state => state.timelines.getIn(['home', 'feedAccountId']));
const selectedAccountId = useAppSelector(state => state.timelines.get('home')?.feedAccountId);
const isSelected = avatar.account_id === selectedAccountId;
const handleClick = () =>
@ -37,11 +37,11 @@ const CarouselItem = ({ avatar }: { avatar: any }) => {
'ring-transparent': !isSelected,
'ring-primary-600': isSelected,
})}
alt={avatar.username}
alt={avatar.acct}
/>
</div>
<Text theme='muted' size='sm' truncate align='center' className='leading-3'>{avatar.username}</Text>
<Text theme='muted' size='sm' truncate align='center' className='leading-3'>{avatar.acct}</Text>
</Stack>
</div>
);

Wyświetl plik

@ -19,7 +19,7 @@ const HomeTimeline: React.FC = () => {
const polling = useRef<NodeJS.Timer | null>(null);
const isPartial = useAppSelector(state => state.timelines.get('home')?.isPartial === true);
const currentAccountId = useAppSelector(state => state.timelines.getIn(['home', 'feedAccountId']));
const currentAccountId = useAppSelector(state => state.timelines.get('home')?.feedAccountId);
const siteTitle = useAppSelector(state => state.instance.title);
const handleLoadMore = (maxId: string) => {