parent
fb45cc1d0f
commit
27305f6248
@ -0,0 +1,18 @@
|
||||
'use client';
|
||||
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
export default function PlayButton({ no, className }: { no: string; className?: string }) {
|
||||
const router = useRouter();
|
||||
const handleClick = (e: React.MouseEvent) => {
|
||||
e.preventDefault();
|
||||
router.push(`/vol/${no}?autoPlay=1`);
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`w-[46px] h-[32px] bg-[url(/img/icon/play-journal-card.svg)] bg-no-repeat z-2 ${className}`}
|
||||
onClick={handleClick}
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Reference in new issue