♻️ Abstraction of specific AddModal component out of the Navbar (#1246)
This commit is contained in:
@@ -20,6 +20,7 @@ import { Suspense } from "react"
|
||||
import { type UserPublic, UsersService } from "../../client"
|
||||
import ActionsMenu from "../../components/Common/ActionsMenu"
|
||||
import Navbar from "../../components/Common/Navbar"
|
||||
import AddUser from "../../components/Admin/AddUser"
|
||||
|
||||
export const Route = createFileRoute("/_layout/admin")({
|
||||
component: Admin,
|
||||
@@ -93,7 +94,7 @@ function Admin() {
|
||||
<Heading size="lg" textAlign={{ base: "center", md: "left" }} pt={12}>
|
||||
User Management
|
||||
</Heading>
|
||||
<Navbar type={"User"} />
|
||||
<Navbar type={"User"} addModalAs={AddUser}/>
|
||||
<TableContainer>
|
||||
<Table fontSize="md" size={{ base: "sm", md: "md" }}>
|
||||
<Thead>
|
||||
|
@@ -20,6 +20,7 @@ import { useEffect } from "react"
|
||||
import { ItemsService } from "../../client"
|
||||
import ActionsMenu from "../../components/Common/ActionsMenu"
|
||||
import Navbar from "../../components/Common/Navbar"
|
||||
import AddItem from "../../components/Items/AddItem"
|
||||
|
||||
const itemsSearchSchema = z.object({
|
||||
page: z.number().catch(1),
|
||||
@@ -135,7 +136,7 @@ function Items() {
|
||||
Items Management
|
||||
</Heading>
|
||||
|
||||
<Navbar type={"Item"} />
|
||||
<Navbar type={"Item"} addModalAs={AddItem}/>
|
||||
<ItemsTable />
|
||||
</Container>
|
||||
)
|
||||
|
Reference in New Issue
Block a user