Skip to content

Commit

Permalink
pref:tree Shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Jeff committed Aug 17, 2024
1 parent 9598db0 commit 4f5fda5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import "./globals.css";
import "@rainbow-me/rainbowkit/styles.css";
import "@radix-ui/themes/styles.css";
import { Navbar } from "@/components/navbar";
import Footer from "@/components/footer";
import { Theme } from "@radix-ui/themes";
import React from "react";
import { Providers } from "./providers";
import "bootstrap/dist/css/bootstrap.min.css";
import Footer from "@/components/footer";

function RootLayout({ children }: { children: React.ReactNode }) {
return (
Expand Down
10 changes: 4 additions & 6 deletions src/app/seats/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ function Seats() {
];
const price = 30;
const totalprice = price * (selected ? 1 : 0);

const removeSeatCallback = ({ row, number }, removeCb) => {
setSelected(null);
removeCb(row, number);
};
const addSeatCallback = ({ row, number, id }, addCb, removeCb) => {
// 如果已有选中的座位,先取消选中
if (selected) {
Expand All @@ -157,11 +160,6 @@ function Seats() {
addCb(row, number, id, newTooltip);
};

const removeSeatCallback = ({ row, number }, removeCb) => {
setSelected(null);
removeCb(row, number);
};

return (
<Container className="mt-5 container">
<h2>
Expand Down

0 comments on commit 4f5fda5

Please sign in to comment.