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