|
|
@ -39,9 +39,11 @@ const DailyReview = () => {
|
|
|
|
.sort((a, b) => getTimeStampByDate(a.createdTs) - getTimeStampByDate(b.createdTs));
|
|
|
|
.sort((a, b) => getTimeStampByDate(a.createdTs) - getTimeStampByDate(b.createdTs));
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
let offset = 0;
|
|
|
|
const fetchMoreMemos = async () => {
|
|
|
|
const fetchMoreMemos = async () => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const fetchedMemos = await memoStore.fetchMemos();
|
|
|
|
const fetchedMemos = await memoStore.fetchMemos(DEFAULT_MEMO_LIMIT, offset);
|
|
|
|
|
|
|
|
offset += fetchedMemos.length;
|
|
|
|
if (fetchedMemos.length === DEFAULT_MEMO_LIMIT) {
|
|
|
|
if (fetchedMemos.length === DEFAULT_MEMO_LIMIT) {
|
|
|
|
const lastMemo = last(fetchedMemos);
|
|
|
|
const lastMemo = last(fetchedMemos);
|
|
|
|
if (lastMemo && lastMemo.createdTs > currentDateStamp) {
|
|
|
|
if (lastMemo && lastMemo.createdTs > currentDateStamp) {
|
|
|
|