Skip to content

ISSUE: Total Pages Calculation Fix for project RMTDEV #7

Open
@Dev-Dipesh

Description

Project: rmtdev
Video Number: 158
Video Title: Finish Pagination (Derived State)

ISSUE: In the video, we're calculating the total pages without using Math.ceil().

FIX:
Math.ceil is important here because we want to round up to the nearest whole number. For example, if we have 15 jobs and we want to display 7 jobs per page, we need 3 pages.

15 / 7 = 2.14 // Simple division will set total pages to 2, which will lead to missing the last job

Math.ceil(2.14) = 3 // We need 3 pages to show all 15 jobs

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions