Commit 1066badb by Madhankumar

code optmized

parent 75154cde
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
"reservedSeats": [ "reservedSeats": [
{ {
"seats": [ "seats": [
"H7", "E4",
"G6" "D4"
], ],
"id": 2 "id": 2
}, },
......
import Button from '.' import Button from ".";
export default { export default {
title: "Base/Button", title: "Base/Button",
component: Button, component: Button,
argTypes: { argTypes: {
onClick: { action: "Clicked" }, onClick: { action: "Clicked" },
}, },
};
} export const button = {
export const button= {
args: { args: {
children: "Submit", children: "Submit",
},
} };
}
\ No newline at end of file
import Layout from "../../Base/layout"; import Layout from "../../base/layout";
import Image from "../../../assets/conform.png"; import Image from "../../../assets/conform.png";
import style from "./confirmation.module.css"; import style from "./confirmation.module.css";
import Button from "../../Base/button"; import Button from "../../base/button";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
function Confirmation({ seatCount, seats, onLogOut, onEdit }) { function Confirmation({ seatCount, seats, onLogOut, onEdit }) {
......
import { useState } from "react"; import { useState } from "react";
import Button from "../../Base/button";
import Input from "../../Base/input"; import Button from "../../base/button";
import Layout from "../../Base/layout"; import Input from "../../base/input";
import Layout from "../../base/layout";
import { toast } from "react-toastify"; import { toast } from "react-toastify";
import styles from "./login.module.css"; import styles from "./login.module.css";
function Login({ onSubmit }) { function Login({ onSubmit }) {
......
// import { useNavigate } from "react-router-dom"; // import { useNavigate } from "react-router-dom";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import Button from "../../Base/button"; import Button from "../../base/button";
import styles from "./seat-layout.module.css"; import styles from "./seat-layout.module.css";
import Seat from "../seat"; import Seat from "../seat";
import { toast } from "react-toastify"; import { toast } from "react-toastify";
......
import { useState } from "react"; import { useState } from "react";
import Button from "../../Base/button"; import Button from "../../base/button";
import Layout from "../../Base/layout"; import Layout from "../../base/layout";
import Input from "../../Base/input"; import Input from "../../base/input";
import { toast } from "react-toastify"; import { toast } from "react-toastify";
function SeatLimit({ onLimit, ...props }) { function SeatLimit({ onLimit, ...props }) {
const [limit, setLimit] = useState(0); const [limit, setLimit] = useState(0);
......
import { useState } from "react";
import styles from "./seat.module.css"; import styles from "./seat.module.css";
function Seat({ onChange, status, seatNo }) { function Seat({ onChange, status, seatNo }) {
const [show, setShow] = useState(false);
const handleCheckbox = () => { const handleCheckbox = () => {
if (status == "available" || status == "selected") { if (status == "available" || status == "selected") {
onChange({ onChange({
...@@ -24,8 +22,6 @@ function Seat({ onChange, status, seatNo }) { ...@@ -24,8 +22,6 @@ function Seat({ onChange, status, seatNo }) {
: styles["checkbox-available"] : styles["checkbox-available"]
}`} }`}
title={seatNo} title={seatNo}
onMouseEnter={() => setShow(true)}
onMouseLeave={() => setShow(false)}
/> />
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment