Basic Offset Pagination
@@ -118,13 +118,13 @@ const Header = () => (
function App() {
const showBasicOffsetPagination = () => {
if (window.location.pathname === "/basicOffsetPagination") {
- return
;
+ return
;
}
};
const showOffsetPaginationWithPageNumbers = () => {
if (window.location.pathname === "/offsetPaginationWithPageNumbers") {
- return
;
+ return
;
}
};
@@ -136,7 +136,7 @@ function App() {
const showBidirecionalPagination = () => {
if (window.location.pathname === "/bidirectionalPagination") {
- return
;
+ return
;
}
};
@@ -164,7 +164,7 @@ export default App;
Now, we can craft our Todos pages, which will present users with a list of todos-a small chuck of the large dataset in three different ways.
-Create four new files in `src/pages/` folder, name them `TodosWithBasicPagination`, `TodosWithBasicPaginationAndNumbers`, `TodosWithBasicCursorPagination`, and `TodosWithBidirectionalPagination `. Then insert this placeholder code in each file:
+Create four new files in `src/pages/` folder, name them `TodosWithOffsetPagination`, `TodosWithOffsetPaginationAndNumbers`, `TodosWithBasicCursorPagination`, and `TodosWithBidirectionalCursorPagination `. Then insert this placeholder code in each file:
```js
import { useTodos } from "../lib/context/todos";
diff --git a/src/routes/docs/tutorials/pagination/step-7/+page.markdoc b/src/routes/docs/tutorials/pagination/step-7/+page.markdoc
index f7ab7c1bcf..2db6c4f88e 100644
--- a/src/routes/docs/tutorials/pagination/step-7/+page.markdoc
+++ b/src/routes/docs/tutorials/pagination/step-7/+page.markdoc
@@ -29,7 +29,7 @@ We'll explore different UI patterns for offset pagination and how to implement t
{% tabs %}
{% tabsitem #Basic-pagination title="Basic Pagination" %}
-Open the file named `src/pages/TodosWithBasicPagination.jsx`, overwrite it with the following code:
+Open the file named `src/pages/TodosWithOffsetPagination.jsx`, overwrite it with the following code:
```js
import { useCallback } from "react";
import { useTodos } from "../lib/context/todos";
@@ -61,7 +61,7 @@ function BasicPagination(props) {
);
}
-function TodosWithBasicPagination() {
+function TodosWithOffsetPagination() {
const todos = useTodos();
return (
@@ -85,17 +85,17 @@ function TodosWithBasicPagination() {
);
}
-export default TodosWithBasicPagination;
+export default TodosWithOffsetPagination;
```
This component will only have "Previous" and "Next" buttons.
{% /tabsitem %}
{% tabsitem #numbered-pagination title="Numbered Pagination" %}
-Open the file named `src/pages/TodosWithBasicPaginationAndNumbers.jsx`, overwrite it with the following code:
+Open the file named `src/pages/TodosWithOffsetPaginationAndNumbers.jsx`, overwrite it with the following code:
```js
import { useCallback } from "react";
import { useTodos } from "../lib/context/todos";
-export function TodosWithBasicPaginationAndNumbers() {
+export function TodosWithOffsetPaginationAndNumbers() {
const todos = useTodos();
return (
diff --git a/src/routes/docs/tutorials/pagination/step-8/+page.markdoc b/src/routes/docs/tutorials/pagination/step-8/+page.markdoc
index 98af1acfe2..c75f43f252 100644
--- a/src/routes/docs/tutorials/pagination/step-8/+page.markdoc
+++ b/src/routes/docs/tutorials/pagination/step-8/+page.markdoc
@@ -81,12 +81,12 @@ function CursorPagination(props) {
This is the most straightforward use of cursor pagination. You have "Load More" button,which will fetch more data based on the last item's cursor.
{% /tabsitem %}
{% tabsitem #Bidirectional-cursor-pagination title="Bidirectional Cursor Pagination" %}
-Open the file named `src/pages/TodosWithBidirectionalPagination.jsx`, overwrite the content with the following code:
+Open the file named `src/pages/TodosWithBidirectionalCursorPagination.jsx`, overwrite the content with the following code:
```js
import React, { useCallback } from "react";
import { useTodos } from "../lib/context/todos-cursor-pagination";
-export function TodosWithBidirectionalPagination() {
+export function TodosWithBidirectionalCursorPagination() {
const todos = useTodos();
return (