Files
flxn-app/src/features/core/components/back-button.tsx
T
kyle 15aeb64b19
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Successful in 8s
CI/CD Pipeline / i18n Catalog Check (push) Successful in 40s
CI/CD Pipeline / Build and Push App Docker Image (push) Successful in 2m6s
CI/CD Pipeline / Deploy to Kubernetes (push) Successful in 8m27s
pwa fixes
2026-08-23 21:51:38 -07:00

25 lines
721 B
TypeScript

import { UnstyledButton } from "@mantine/core"
import { ArrowLeftIcon } from "@phosphor-icons/react"
import { useRouter } from "@tanstack/react-router"
import { useLingui } from "@lingui/react/macro"
const BackButton = ({ top=20, left=20 }: { top?: number, left?: number }) => {
const router = useRouter()
const { t } = useLingui()
return (
<UnstyledButton
aria-label={t`Go back`}
style={{ cursor: 'pointer', zIndex: 1000, display: 'flex' }}
onClick={() => router.history.back()}
pos='absolute'
left={left}
top={`calc(${top}px + env(safe-area-inset-top, 0px))`}
>
<ArrowLeftIcon weight='bold' size={20} />
</UnstyledButton>
);
}
export default BackButton;