Refactor: force style consistency for pagination queries

All pagination queries now use an underscore for page_num, and page_size
This commit is contained in:
Aaron William Po
2023-05-02 23:45:32 -04:00
parent c5b546dcf6
commit b7b239a4a1
7 changed files with 33 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
import {FC} from 'react';
import { FC } from 'react';
import Spinner from '../ui/Spinner';
import CommentLoadingCardBody from '../BeerBreweryComments/CommentLoadingCardBody';
@@ -6,10 +6,10 @@ interface LoadingComponentProps {
length: number;
}
const LoadingComponent: FC<LoadingComponentProps> = ({length}) => {
const LoadingComponent: FC<LoadingComponentProps> = ({ length }) => {
return (
<>
{Array.from({length}).map((_, i) => (
{Array.from({ length }).map((_, i) => (
<CommentLoadingCardBody key={i} />
))}
<div className="p-1">

View File

@@ -1,7 +1,7 @@
import {FC, MutableRefObject} from 'react';
import {FaArrowUp} from 'react-icons/fa';
import { FC, MutableRefObject } from 'react';
import { FaArrowUp } from 'react-icons/fa';
import {useInView} from 'react-intersection-observer';
import { useInView } from 'react-intersection-observer';
import useBeerPostComments from '@/hooks/data-fetching/beer-comments/useBeerPostComments';
@@ -41,7 +41,7 @@ const CommentsComponent: FC<CommentsComponentProps> = ({
size,
mutate,
}) => {
const {ref: penultimateCommentRef} = useInView({
const { ref: penultimateCommentRef } = useInView({
/**
* When the second last comment comes into view, call setSize from useBeerPostComments
* to load more comments.