Rename interfaces, AppBar changes

This commit is contained in:
cracklesparkle
2024-06-28 12:33:07 +09:00
parent c41e59cd86
commit af1d497715
13 changed files with 165 additions and 80 deletions

View File

@ -2,7 +2,7 @@ import { Box, Button, CircularProgress } from "@mui/material"
import DataTable from "../components/DataTable"
import { GridColDef } from "@mui/x-data-grid"
import { useRoles, useUsers } from "../hooks/swrHooks"
import { Role } from "../interfaces/auth"
import { IRole } from "../interfaces/role"
import { useState } from "react"
import CreateUserModal from "../components/modals/CreateUserModal"
@ -26,7 +26,7 @@ export default function Users() {
headerName: 'Роль',
valueGetter: (value, row) => {
if (roles) {
const roleName = roles.find((role: Role) => role.id === value).name
const roleName = roles.find((role: IRole) => role.id === value).name
return roleName
} else {
return value