Switch to Preact!!!

This commit is contained in:
Gregory Schier
2023-03-09 00:47:25 -08:00
parent d1b5b9c371
commit e647d23adc
29 changed files with 349 additions and 553 deletions

View File

@@ -1,22 +1,14 @@
import classnames from 'classnames';
import type { LinkProps } from 'react-router-dom';
import { Link } from 'react-router-dom';
import { Link } from 'preact-router';
import type { ButtonProps } from './Button';
import { Button } from './Button';
type Props = ButtonProps & LinkProps;
type Props = ButtonProps & {
href: string;
};
export function ButtonLink({
reloadDocument,
replace,
state,
preventScrollReset,
relative,
to,
className,
...buttonProps
}: Props) {
const linkProps = { reloadDocument, replace, state, preventScrollReset, relative, to };
export function ButtonLink({ href, className, ...buttonProps }: Props) {
const linkProps = { href };
return (
<Link {...linkProps}>
<Button className={classnames(className, 'w-full')} {...buttonProps} />