back-button.tsx

src/components/back-button.tsx
'use client'
import { useEffect } from 'react'
import { useInView } from 'react-intersection-observer'
import { Icon } from '@/components/icon'
import { state } from '@/state'
import chevronLeftIcon from '@iconify/icons-heroicons/chevron-left'
import clsx from 'clsx'
interface BackButtonProps {
className?: string
}
export function goBack() {
const entryLength = Number(
sessionStorage.getItem('entryHistoryLength') ?? window.history.length
)
if (window.history.length > entryLength) {
window.history.back()
} else {

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC