kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Add another isLoggedIn condition
rodzic
71c62c05b8
commit
4ff1f0fa63
|
@ -1,5 +1,6 @@
|
|||
import api from '../api';
|
||||
import { importFetchedStatuses } from './importer';
|
||||
import { isLoggedIn } from 'soapbox/utils/auth';
|
||||
|
||||
export const PINNED_STATUSES_FETCH_REQUEST = 'PINNED_STATUSES_FETCH_REQUEST';
|
||||
export const PINNED_STATUSES_FETCH_SUCCESS = 'PINNED_STATUSES_FETCH_SUCCESS';
|
||||
|
@ -7,8 +8,8 @@ export const PINNED_STATUSES_FETCH_FAIL = 'PINNED_STATUSES_FETCH_FAIL';
|
|||
|
||||
export function fetchPinnedStatuses() {
|
||||
return (dispatch, getState) => {
|
||||
if (!isLoggedIn(getState)) return;
|
||||
const me = getState().get('me');
|
||||
if (!me) return;
|
||||
|
||||
dispatch(fetchPinnedStatusesRequest());
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue