Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
476 Bytes
import { type NoticeMessage } from '../../interfaces/noticeMessage.interface.js'
import { type NoticeMessageInState } from '../reducers/noticesReducer.js'
export const ADD_NOTICE = 'ADD_NOTICE'
export type AddNoticeResponse = {
type: typeof ADD_NOTICE
data: NoticeMessageInState
}
export const addNotice = (data: NoticeMessage): AddNoticeResponse => ({
type: ADD_NOTICE,
data: {
id: `notice-${Date.now() + Math.random()}`,
progress: 0,
...data,
},
})