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:
@@ -1,6 +1,6 @@
|
||||
import Table from '@material-ui/core/Table'
|
||||
import TableBody from '@material-ui/core/TableBody'
|
||||
import inflection from 'inflection'
|
||||
import { humanize, underscore } from 'inflection'
|
||||
import TableCell from '@material-ui/core/TableCell'
|
||||
import TableContainer from '@material-ui/core/TableContainer'
|
||||
import TableRow from '@material-ui/core/TableRow'
|
||||
@@ -112,7 +112,7 @@ const AlbumInfo = (props) => {
|
||||
className={classes.tableCell}
|
||||
>
|
||||
{translate(`resources.album.fields.${key}`, {
|
||||
_: inflection.humanize(inflection.underscore(key)),
|
||||
_: humanize(underscore(key)),
|
||||
})}
|
||||
:
|
||||
</TableCell>
|
||||
|
||||
@@ -31,7 +31,7 @@ import albumLists, { defaultAlbumList } from './albumLists'
|
||||
import config from '../config'
|
||||
import AlbumInfo from './AlbumInfo'
|
||||
import ExpandInfoDialog from '../dialogs/ExpandInfoDialog'
|
||||
import inflection from 'inflection'
|
||||
import { humanize } from 'inflection'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
|
||||
const useStyles = makeStyles({
|
||||
@@ -140,9 +140,7 @@ const AlbumFilter = (props) => {
|
||||
<AutocompleteInput
|
||||
emptyText="-- None --"
|
||||
optionText={(record) =>
|
||||
record?.tagValue
|
||||
? inflection.humanize(record?.tagValue)
|
||||
: '-- None --'
|
||||
record?.tagValue ? humanize(record?.tagValue) : '-- None --'
|
||||
}
|
||||
/>
|
||||
</ReferenceInput>
|
||||
|
||||
Reference in New Issue
Block a user