bigbuffet-rw/app/soapbox/utils/quirks.js
2021-03-30 11:53:45 -05:00

12 lines
373 B
JavaScript

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';