@@ -69,8 +69,8 @@ export type MessageActions<M extends Message = ToastMessage> =
6969 | ResetQueueAction ;
7070
7171/**
72- * This function is used to update the message queue state by adding a new message when
73- * needed.
72+ * This function is used to update the message queue state by adding a new
73+ * message when needed.
7474 *
7575 * @internal
7676 */
@@ -94,8 +94,8 @@ export function handleAddMessage<M extends Message = ToastMessage>(
9494 if ( isNext || isImmediate ) {
9595 const nextState = state . slice ( ) ;
9696
97- // remove the existing message if duplicated messages aren't allowed. This will
98- // kind of act like a replace + next behavior
97+ // remove the existing message if duplicated messages aren't allowed. This
98+ // will kind of act like a replace + next behavior
9999 if ( ! isDuplicable && i > 0 ) {
100100 nextState . splice ( i , 1 ) ;
101101 }
@@ -114,8 +114,8 @@ export function handleAddMessage<M extends Message = ToastMessage>(
114114
115115 if ( isNormal ) {
116116 if ( isRestart ) {
117- // creating a new state so that the queue visibility hook can still be triggered
118- // which will restart the timer
117+ // creating a new state so that the queue visibility hook can still be
118+ // triggered which will restart the timer
119119 return state . slice ( ) ;
120120 }
121121
@@ -171,7 +171,8 @@ export interface MessageQueueResult<M extends Message = ToastMessage>
171171/**
172172 * This is the main logic for the message queue behavior that will handle:
173173 *
174- * - creating timeouts as needed to show/hide toasts within the SnackbarQueue component
174+ * - creating timeouts as needed to show/hide toasts within the `SnackbarQueue`
175+ * component
175176 * - create a way to push messages with optional priority onto the queue
176177 *
177178 * @internal
@@ -217,8 +218,8 @@ export function useMessageQueue<M extends Message = ToastMessage>({
217218 ) ;
218219
219220 useEffect ( ( ) => {
220- // this effect will handle all the "logic" for transitioning between each message along with the
221- // message priority updates.
221+ // this effect will handle all the "logic" for transitioning between each
222+ // message along with the message priority updates.
222223 const [ message , nextMessage ] = queue ;
223224 if ( ! message ) {
224225 return ;
0 commit comments