diff --git a/package.json b/package.json
index 1fc424b..1ff9d42 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,7 @@
"react-dom": "^18",
"react-query": "^3.39.3",
"react-seat-picker": "^1.5.3",
+ "react-type-animation": "^3.2.0",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.3.0",
"viem": "2.x",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 515945a..ce802ce 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -80,6 +80,9 @@ dependencies:
react-seat-picker:
specifier: ^1.5.3
version: 1.5.3(prop-types@15.8.1)(react-dom@18.3.1)(react-tooltip@3.11.6)(react@18.3.1)
+ react-type-animation:
+ specifier: ^3.2.0
+ version: 3.2.0(prop-types@15.8.1)(react-dom@18.3.1)(react@18.3.1)
tailwind-merge:
specifier: ^2.3.0
version: 2.5.2
@@ -12693,6 +12696,18 @@ packages:
react-dom: 18.3.1(react@18.3.1)
dev: false
+ /react-type-animation@3.2.0(prop-types@15.8.1)(react-dom@18.3.1)(react@18.3.1):
+ resolution: {integrity: sha512-WXTe0i3rRNKjmggPvT5ntye1QBt0ATGbijeW6V3cQe2W0jaMABXXlPPEdtofnS9tM7wSRHchEvI9SUw+0kUohw==}
+ peerDependencies:
+ prop-types: ^15.5.4
+ react: '>= 15.0.0'
+ react-dom: '>= 15.0.0'
+ dependencies:
+ prop-types: 15.8.1
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+ dev: false
+
/react@18.3.1:
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 48277cb..4b1cc64 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -15,7 +15,7 @@ function RootLayout({ children }: { children: React.ReactNode }) {
- {children}
+ {children}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e7e1302..8da78b3 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,11 +1,12 @@
+"use client";
+
import HallSection from "@/components/hall-section";
+import { useAccount } from "wagmi";
export default function Page() {
- return (
-
- {/* */}
-
+ const account = useAccount();
-
+ return (
+ account?.isConnected && account?.chain?.name === "Sepolia" ? : Please connect wallet
);
}
diff --git a/src/app/seats/[slug]/page.tsx b/src/app/seats/[slug]/page.tsx
index 9899c0b..a54bc32 100644
--- a/src/app/seats/[slug]/page.tsx
+++ b/src/app/seats/[slug]/page.tsx
@@ -1,22 +1,17 @@
"use client";
import React, { useState } from "react";
-import { useRouter, useParams } from "next/navigation";
+import { useParams } from "next/navigation";
import SeatPicker from "react-seat-picker";
import {
- Badge,
Box,
- Text,
- Tabs,
Button,
Dialog,
- Strong,
Flex,
- Spinner,
} from "@radix-ui/themes";
import { Cross1Icon } from "@radix-ui/react-icons";
import {
- Container, Row, Col, Card,
+ Container, Card,
} from "react-bootstrap";
import "@/styles/seats.css";
import clsx from "clsx";
@@ -25,20 +20,13 @@ import {
} from "@nextui-org/react";
function Seats() {
- const [loading, setLoading] = useState(true);
const [selected, setSelected] = useState("");
const [startPrice, setStartPrice] = useState("");
- const [bidPrice, setBidPrice] = useState("");
- const [floorPrice, setFloorPrice] = useState("");
- const [reserveDuration, setReserveDuration] = useState("");
const [interval, setInterval] = useState("");
- const [decayInterval, setDecayInterval] = useState("");
- const [decayAmount, setDecayAmount] = useState("");
const [errMsg, setErrMsg] = useState("");
const [open, setOpen] = useState(false);
- const router = useRouter();
- const { hallId } = useParams();
+ const { slug } = useParams();
const rows = [
[
{ id: 1, number: "A1" },
@@ -50,11 +38,11 @@ function Seats() {
{ id: 44, number: "A7" },
{ id: 54, number: "A8" },
null,
- { id: 5, number: "A8" },
- { id: 6, number: "A9" },
- { id: 7, number: "A10" },
- { id: 8, number: "A11" },
- { id: 9, number: "A12", isReserved: true },
+ { id: 5, number: "A9" },
+ { id: 6, number: "A10" },
+ { id: 7, number: "A11" },
+ { id: 8, number: "A12" },
+ { id: 9, number: "A13", isReserved: true },
],
[
{ id: 11, number: "B1" },
@@ -178,7 +166,7 @@ function Seats() {
当前放映厅:
- {hallId}
+ {slug}
SCREEN
diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx
index 1a6ecd7..854b173 100644
--- a/src/components/navbar/navbar.tsx
+++ b/src/components/navbar/navbar.tsx
@@ -9,15 +9,14 @@ import { cn } from "@/lib/utils";
import { ConnectButton } from "@rainbow-me/rainbowkit";
import { useRouter } from "next/navigation";
-import Image from "next/image";
import { Icon } from "@iconify/react";
-import AvatarDiv from "../avatar";
-import TooltipProvider from "../tooltip";
-import logo from "/public/logo.png";
+import { useAccount } from "wagmi";
export const Navbar = () => {
const scroll = useScroll(() => document);
const router = useRouter();
+ const account = useAccount();
+ const isShowAvatar = account?.isConnected && account?.chain?.name === "Sepolia";
return (
);