mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Fix: update deprecated button group (daisy ui) to join
This commit is contained in:
@@ -121,10 +121,10 @@ const EditCommentBody: FC<EditCommentBodyProps> = ({
|
|||||||
))}
|
))}
|
||||||
</Rating>
|
</Rating>
|
||||||
</div>
|
</div>
|
||||||
<div className="btn-group btn-group-horizontal">
|
<div className="join">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn-xs btn lg:btn-sm"
|
className="btn-xs join-item btn lg:btn-sm"
|
||||||
disabled={isSubmitting || isDeleting}
|
disabled={isSubmitting || isDeleting}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setInEditMode(false);
|
setInEditMode(false);
|
||||||
@@ -135,13 +135,13 @@ const EditCommentBody: FC<EditCommentBodyProps> = ({
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={isSubmitting || isDeleting}
|
disabled={isSubmitting || isDeleting}
|
||||||
className="btn-xs btn lg:btn-sm"
|
className="btn-xs join-item btn lg:btn-sm"
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn-xs btn lg:btn-sm"
|
className="btn-xs join-item btn lg:btn-sm"
|
||||||
onClick={onDelete}
|
onClick={onDelete}
|
||||||
disabled={isDeleting || formState.isSubmitting}
|
disabled={isDeleting || formState.isSubmitting}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
import Link from 'next/link';
|
|
||||||
import { FaArrowLeft, FaArrowRight } from 'react-icons/fa';
|
|
||||||
import { FC } from 'react';
|
|
||||||
|
|
||||||
interface PaginationProps {
|
|
||||||
pageNum: number;
|
|
||||||
pageCount: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
const BeerIndexPaginationBar: FC<PaginationProps> = ({ pageCount, pageNum }) => {
|
|
||||||
return (
|
|
||||||
<div className="btn-group">
|
|
||||||
<Link
|
|
||||||
className={`btn ${pageNum === 1 ? 'btn-disabled' : ''}`}
|
|
||||||
href={{ pathname: '/beers', query: { page_num: pageNum - 1 } }}
|
|
||||||
scroll={false}
|
|
||||||
>
|
|
||||||
<FaArrowLeft />
|
|
||||||
</Link>
|
|
||||||
<button className="btn">Page {pageNum}</button>
|
|
||||||
<Link
|
|
||||||
className={`btn ${pageNum === pageCount ? 'btn-disabled' : ''}`}
|
|
||||||
href={{ pathname: '/beers', query: { page_num: pageNum + 1 } }}
|
|
||||||
scroll={false}
|
|
||||||
>
|
|
||||||
<FaArrowRight />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default BeerIndexPaginationBar;
|
|
||||||
@@ -12,11 +12,11 @@ const DesktopLinks: FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="block flex-none">
|
<div className="block flex-none">
|
||||||
<ul className="menu menu-horizontal menu-sm px-1">
|
<ul className="menu menu-horizontal menu-sm">
|
||||||
{pages.map((page) => {
|
{pages.map((page) => {
|
||||||
return (
|
return (
|
||||||
<li key={page.slug}>
|
<li key={page.slug} >
|
||||||
<Link tabIndex={0} href={page.slug}>
|
<Link tabIndex={0} href={page.slug} className="hover:bg-primary-focus">
|
||||||
<span
|
<span
|
||||||
className={`text-lg uppercase ${
|
className={`text-lg uppercase ${
|
||||||
currentURL === page.slug ? 'font-black' : 'font-medium'
|
currentURL === page.slug ? 'font-black' : 'font-medium'
|
||||||
@@ -64,7 +64,7 @@ const Navbar = () => {
|
|||||||
const { theme, setTheme } = useTheme();
|
const { theme, setTheme } = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="navbar sticky top-0 z-50 bg-primary text-primary-content">
|
<div className="navbar sticky top-0 z-50 bg-primary text-primary-content">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<Link className="btn-ghost btn normal-case" href="/">
|
<Link className="btn-ghost btn normal-case" href="/">
|
||||||
<span className="cursor-pointer text-lg font-bold">The Biergarten App</span>
|
<span className="cursor-pointer text-lg font-bold">The Biergarten App</span>
|
||||||
@@ -98,7 +98,7 @@ const Navbar = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{isDesktopView ? <DesktopLinks /> : <MobileLinks />}</div>
|
<div>{isDesktopView ? <DesktopLinks /> : <MobileLinks />}</div>
|
||||||
</nav>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default Navbar;
|
export default Navbar;
|
||||||
|
|||||||
Reference in New Issue
Block a user