fix(ui): fix make dev (#3795)
1. For some bizarre reason, importing inflection by itself is undefined. But you can import specific functions 2. Per https://github.com/vite-pwa/vite-plugin-pwa/issues/419, `type: 'module',` is only for non-chromium browsers
This commit is contained in:
@@ -10,7 +10,7 @@ import TableRow from '@material-ui/core/TableRow'
|
||||
import TableCell from '@material-ui/core/TableCell'
|
||||
import Paper from '@material-ui/core/Paper'
|
||||
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder'
|
||||
import inflection from 'inflection'
|
||||
import { humanize, underscore } from 'inflection'
|
||||
import { useGetOne, usePermissions, useTranslate } from 'react-admin'
|
||||
import config from '../config'
|
||||
import { DialogTitle } from './DialogTitle'
|
||||
@@ -136,7 +136,7 @@ const AboutDialog = ({ open, onClose }) => {
|
||||
<TableRow key={key}>
|
||||
<TableCell align="right" component="th" scope="row">
|
||||
{translate(`about.links.${key}`, {
|
||||
_: inflection.humanize(inflection.underscore(key)),
|
||||
_: humanize(underscore(key)),
|
||||
})}
|
||||
:
|
||||
</TableCell>
|
||||
|
||||
@@ -9,7 +9,7 @@ import TableBody from '@material-ui/core/TableBody'
|
||||
import TableRow from '@material-ui/core/TableRow'
|
||||
import TableCell from '@material-ui/core/TableCell'
|
||||
import { useTranslate } from 'react-admin'
|
||||
import inflection from 'inflection'
|
||||
import { humanize } from 'inflection'
|
||||
import { keyMap } from '../hotkeys'
|
||||
import { DialogTitle } from './DialogTitle'
|
||||
import { DialogContent } from './DialogContent'
|
||||
@@ -29,7 +29,7 @@ const HelpTable = (props) => {
|
||||
{Object.keys(keyMap).map((key) => {
|
||||
const { sequences, name } = keyMap[key]
|
||||
const description = translate(`help.hotkeys.${name}`, {
|
||||
_: inflection.humanize(name),
|
||||
_: humanize(name),
|
||||
})
|
||||
return (
|
||||
<TableRow key={key}>
|
||||
|
||||
Reference in New Issue
Block a user