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 { | |
| Box, | |
| CloseButton, | |
| Container, | |
| OverlayBackdrop, | |
| OverlayBody | |
| } from './style' | |
| import { MdClose } from 'react-icons/md' |
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 { TypedEmitter } from 'tiny-typed-emitter' | |
| export class Collection<T = any> extends TypedEmitter<{ | |
| forceUpdate: () => void | |
| }> { | |
| private collection: T[] = [] | |
| private primaryKey: string = 'id' | |
| public addMany(items: T[]) { | |
| for (const item of items) { |
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
| public async updateAll({ request }: HttpContextContract) { | |
| const {items} = request.all() | |
| return await Link.updateOrCreateMany(['title'], items) | |
| } |