This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useRef, useState } from 'react'; | |
| import { Typography } from '@material-ui/core'; | |
| import TextField from '@material-ui/core/TextField'; | |
| import CircularProgress from '@material-ui/core/CircularProgress'; | |
| import Autocomplete, { | |
| AutocompleteChangeDetails, | |
| AutocompleteChangeReason, | |
| AutocompleteProps | |
| } from '@material-ui/lab/Autocomplete'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const hydrate = require('feathers-sequelize/hooks/hydrate'); | |
| function includePoster() { | |
| return function (hook) { | |
| const model = hook.app.service('users').Model; | |
| const association = { include: [{ model: model, as: 'poster', attributes: ['userId', 'displayName', 'avatar'] }] }; | |
| switch (hook.type) { | |
| case 'before': | |
| hook.params.sequelize = Object.assign(association, { raw: false }); |