diff --git a/src/app/postman/page.mdx b/src/app/postman/page.mdx
new file mode 100644
index 0000000..080b162
--- /dev/null
+++ b/src/app/postman/page.mdx
@@ -0,0 +1,27 @@
+export const metadata = {
+ title: 'Postman',
+ description:
+ 'Postman collection (lua.sh.postman_collection.json) is available in the root of this repository. Import it into Postman and set the BASE_URL and API_TOKEN variables to begin testing the API.',
+}
+
+## Postman Collection
+
+A Postman collection is included in the root of this repository:
+**`lua.sh.postman_collection.json`**
+
+### Importing the Collection
+
+1. Open Postman.
+2. Click **"Import"** and choose the **"File"** tab.
+3. Select the file `lua.sh.postman_collection.json` from the repository root.
+
+### Environment Setup
+
+After import, configure the following collection variables:
+
+- `BASE_URL`: The base endpoint of the API (e.g., `https://api.example.com`)
+- `API_TOKEN`: Authorization token for accessing protected endpoints
+
+These variables are required to authenticate and interact with the API successfully.
+
+Once configured, the collection is ready for use.
diff --git a/src/components/Guides.jsx b/src/components/Guides.jsx
index 8b6e3fb..11758b4 100644
--- a/src/components/Guides.jsx
+++ b/src/components/Guides.jsx
@@ -2,53 +2,53 @@ import { Button } from '@/components/Button'
import { Heading } from '@/components/Heading'
const guides = [
- {
- href: '/authentication',
- name: 'Authentication',
- description: 'Learn how to authenticate your API requests.',
- },
- {
- href: '/pagination',
- name: 'Pagination',
- description: 'Understand how to work with paginated responses.',
- },
- {
- href: '/errors',
- name: 'Errors',
- description:
- 'Read about the different types of errors returned by the API.',
- },
- {
- href: '/rate-limits',
- name: 'Rate Limits',
- description:
- 'Understand the rate limits that apply to your API requests.',
- },
+ {
+ href: '/authentication',
+ name: 'Authentication',
+ description: 'Learn how to authenticate your API requests.',
+ },
+ {
+ href: '/pagination',
+ name: 'Pagination',
+ description: 'Understand how to work with paginated responses.',
+ },
+ {
+ href: '/errors',
+ name: 'Errors',
+ description:
+ 'Read about the different types of errors returned by the API.',
+ },
+ {
+ href: '/rate-limits',
+ name: 'Rate Limits',
+ description:
+ 'Understand the rate limits that apply to your API requests.',
+ },
]
export function Guides() {
- return (
-
-
- Guides
-
-
- {guides.map((guide) => (
-
-
- {guide.name}
-
-
- {guide.description}
-
-
-
-
-
- ))}
-
-
- )
+ return (
+
+
+ Guides
+
+
+ {guides.map((guide) => (
+
+
+ {guide.name}
+
+
+ {guide.description}
+
+
+
+
+
+ ))}
+
+
+ )
}
diff --git a/src/components/Navigation.jsx b/src/components/Navigation.jsx
index 60dfb70..13a4ca1 100644
--- a/src/components/Navigation.jsx
+++ b/src/components/Navigation.jsx
@@ -1,10 +1,10 @@
'use client'
-import { useRef } from 'react'
-import Link from 'next/link'
-import { usePathname } from 'next/navigation'
import clsx from 'clsx'
import { AnimatePresence, motion, useIsPresent } from 'framer-motion'
+import Link from 'next/link'
+import { usePathname } from 'next/navigation'
+import { useRef } from 'react'
import { Button } from '@/components/Button'
import { useIsInsideMobileNavigation } from '@/components/MobileNavigation'
@@ -13,233 +13,234 @@ import { Tag } from '@/components/Tag'
import { remToPx } from '@/lib/remToPx'
function useInitialValue(value, condition = true) {
- let initialValue = useRef(value).current
- return condition ? initialValue : value
+ let initialValue = useRef(value).current
+ return condition ? initialValue : value
}
function TopLevelNavItem({ href, children }) {
- return (
-
-
- {children}
-
-
- )
+ return (
+
+
+ {children}
+
+
+ )
}
function NavLink({
- href,
- children,
- tag,
- active = false,
- isAnchorLink = false,
+ href,
+ children,
+ tag,
+ active = false,
+ isAnchorLink = false,
}) {
- return (
-
- {children}
- {tag && (
-
- {tag}
-
- )}
-
- )
+ return (
+
+ {children}
+ {tag && (
+
+ {tag}
+
+ )}
+
+ )
}
function VisibleSectionHighlight({ group, pathname }) {
- let [sections, visibleSections] = useInitialValue(
- [
- useSectionStore((s) => s.sections),
- useSectionStore((s) => s.visibleSections),
- ],
- useIsInsideMobileNavigation(),
- )
+ let [sections, visibleSections] = useInitialValue(
+ [
+ useSectionStore((s) => s.sections),
+ useSectionStore((s) => s.visibleSections),
+ ],
+ useIsInsideMobileNavigation(),
+ )
- let isPresent = useIsPresent()
- let firstVisibleSectionIndex = Math.max(
- 0,
- [{ id: '_top' }, ...sections].findIndex(
- (section) => section.id === visibleSections[0],
- ),
- )
- let itemHeight = remToPx(2)
- let height = isPresent
- ? Math.max(1, visibleSections.length) * itemHeight
- : itemHeight
- let top =
- group.links.findIndex((link) => link.href === pathname) * itemHeight +
- firstVisibleSectionIndex * itemHeight
+ let isPresent = useIsPresent()
+ let firstVisibleSectionIndex = Math.max(
+ 0,
+ [{ id: '_top' }, ...sections].findIndex(
+ (section) => section.id === visibleSections[0],
+ ),
+ )
+ let itemHeight = remToPx(2)
+ let height = isPresent
+ ? Math.max(1, visibleSections.length) * itemHeight
+ : itemHeight
+ let top =
+ group.links.findIndex((link) => link.href === pathname) * itemHeight +
+ firstVisibleSectionIndex * itemHeight
- return (
-
- )
+ return (
+
+ )
}
function ActivePageMarker({ group, pathname }) {
- let itemHeight = remToPx(2)
- let offset = remToPx(0.25)
- let activePageIndex = group.links.findIndex((link) => link.href === pathname)
- let top = offset + activePageIndex * itemHeight
+ let itemHeight = remToPx(2)
+ let offset = remToPx(0.25)
+ let activePageIndex = group.links.findIndex((link) => link.href === pathname)
+ let top = offset + activePageIndex * itemHeight
- return (
-
- )
+ return (
+
+ )
}
function NavigationGroup({ group, className }) {
- // If this is the mobile navigation then we always render the initial
- // state, so that the state does not change during the close animation.
- // The state will still update when we re-open (re-render) the navigation.
- let isInsideMobileNavigation = useIsInsideMobileNavigation()
- let [pathname, sections] = useInitialValue(
- [usePathname(), useSectionStore((s) => s.sections)],
- isInsideMobileNavigation,
- )
+ // If this is the mobile navigation then we always render the initial
+ // state, so that the state does not change during the close animation.
+ // The state will still update when we re-open (re-render) the navigation.
+ let isInsideMobileNavigation = useIsInsideMobileNavigation()
+ let [pathname, sections] = useInitialValue(
+ [usePathname(), useSectionStore((s) => s.sections)],
+ isInsideMobileNavigation,
+ )
- let isActiveGroup =
- group.links.findIndex((link) => link.href === pathname) !== -1
+ let isActiveGroup =
+ group.links.findIndex((link) => link.href === pathname) !== -1
- return (
-