Skip to content

Commit

Permalink
Fixed issue in TabsComponent.story.tsx and reset default export on la…
Browse files Browse the repository at this point in the history
…yoout.tsx
  • Loading branch information
Kartik-M24 committed Oct 1, 2024
1 parent a50e983 commit ad26375
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
11 changes: 3 additions & 8 deletions client/src/app/bookings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import queryClient from "@/services/QueryClient"

type IBookingLayout = Readonly<{
children: ReactNode
policyInfoProps: ReactNode
// policyInfoProps: ReactNode
}>

const InnerBookingLayout = ({ children }: IBookingLayout) => {
Expand Down Expand Up @@ -54,16 +54,11 @@ const InnerBookingLayout = ({ children }: IBookingLayout) => {
)
}

export default function BookingLayout({
children,
policyInfoProps
}: IBookingLayout) {
export default function BookingLayout({ children }: IBookingLayout) {
return (
<QueryClientProvider client={queryClient}>
<BookingContextProvider>
<InnerBookingLayout policyInfoProps={policyInfoProps}>
{children}
</InnerBookingLayout>
<InnerBookingLayout>{children}</InnerBookingLayout>
</BookingContextProvider>
</QueryClientProvider>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Meta } from "@storybook/react"
import TabsComponent from "./TabsComponent"
import { useState } from "react"
import { Tab } from "@/components/generic/TabsComponent/TabsComponent"

const meta: Meta<typeof TabsComponent> = {
component: TabsComponent,
Expand All @@ -27,8 +28,8 @@ const BookingSection = () => (
</>
)

const exampleHeadings = [
{ title: "LODGE BOOKINGS", content: <BookingSection />, index: TabIndex.ONE },
const exampleHeadings: Tab[] = [
{ title: "LODGE BOOKINGS", content: <BookingSection />, order: TabIndex.ONE },
{
title: "CANCELLATION",
content: (
Expand All @@ -39,9 +40,9 @@ const exampleHeadings = [
nesciunt perferendis.
</p>
),
index: TabIndex.TWO
order: TabIndex.TWO
},
{ title: "BEHAVIOUR", content: <p>Contents 3</p>, index: TabIndex.THREE }
{ title: "BEHAVIOUR", content: <p>Contents 3</p>, order: TabIndex.THREE }
]

export const DefaultStory = () => {
Expand Down

0 comments on commit ad26375

Please sign in to comment.