bigbuffet-rw/app/soapbox/utils/quirks.js

13 lines
373 B
JavaScript
Raw Normal View History

2021-03-30 09:53:45 -07:00
import { parseVersion } from './features';
// For solving bugs between API implementations
export const getQuirks = instance => {
const v = parseVersion(instance.get('version'));
return {
invertedPagination: v.software === 'Pleroma',
};
};
export const getNextLinkName = getState =>
getQuirks(getState().get('instance')).invertedPagination ? 'prev' : 'next';