Initial commit AB#12

This commit is contained in:
Noah Spannbauer
2023-01-24 20:03:13 -06:00
commit c2d8bd1838
91 changed files with 29613 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { MessageBarType } from '@fluentui/react';
import { INotification } from '../models/INotification';
import { IAppContextState } from './IAppContextState';
export type Action = { type: 'SET_NOTIFICATION'; payload: INotification };
export const initialState: IAppContextState = {
notification: {
messageBarType: MessageBarType.info,
message: 'Blah blah blah',
isMultiline: false,
isVisible: true
}
};
export const reducer = (
state: IAppContextState,
action: Action
): IAppContextState => {
switch (action.type) {
case 'SET_NOTIFICATION': {
return {
...state,
notification: action.payload
};
}
}
};