@@ -8,13 +8,7 @@ import {
8
8
ReadIcon ,
9
9
TagIcon ,
10
10
} from '@primer/octicons-react' ;
11
- import {
12
- type FC ,
13
- type MouseEvent ,
14
- useCallback ,
15
- useContext ,
16
- useState ,
17
- } from 'react' ;
11
+ import { type FC , type MouseEvent , useCallback , useContext } from 'react' ;
18
12
import { AppContext } from '../context/App' ;
19
13
import { IconColor } from '../types' ;
20
14
import type { Notification } from '../typesGitHub' ;
@@ -44,10 +38,8 @@ export const NotificationRow: FC<IProps> = ({ notification }) => {
44
38
markNotificationDone,
45
39
unsubscribeNotification,
46
40
} = useContext ( AppContext ) ;
47
- const [ animateExit , setAnimateExit ] = useState ( false ) ;
48
41
49
42
const handleNotification = useCallback ( ( ) => {
50
- setAnimateExit ( true ) ;
51
43
openNotification ( notification ) ;
52
44
53
45
if ( settings . markAsDoneOnOpen ) {
@@ -98,11 +90,9 @@ export const NotificationRow: FC<IProps> = ({ notification }) => {
98
90
return (
99
91
< div
100
92
id = { notification . id }
101
- className = { cn (
102
- 'group flex border-b border-gray-100 bg-white px-3 py-2 hover:bg-gray-100 dark:border-gray-darker dark:bg-gray-dark dark:text-white dark:hover:bg-gray-darker' ,
103
- animateExit &&
104
- 'translate-x-full opacity-0 transition duration-[350ms] ease-in-out' ,
105
- ) }
93
+ className = {
94
+ 'group flex border-b border-gray-100 bg-white px-3 py-2 hover:bg-gray-100 dark:border-gray-darker dark:bg-gray-dark dark:text-white dark:hover:bg-gray-darker'
95
+ }
106
96
>
107
97
< div
108
98
className = { cn ( 'mr-3 flex w-5 items-center justify-center' , iconColor ) }
@@ -218,7 +208,6 @@ export const NotificationRow: FC<IProps> = ({ notification }) => {
218
208
className = "h-full hover:text-green-500 focus:outline-none"
219
209
title = "Mark as Done"
220
210
onClick = { ( ) => {
221
- setAnimateExit ( true ) ;
222
211
markNotificationDone ( notification ) ;
223
212
} }
224
213
>
@@ -239,7 +228,6 @@ export const NotificationRow: FC<IProps> = ({ notification }) => {
239
228
className = "h-full hover:text-green-500 focus:outline-none"
240
229
title = "Mark as Read"
241
230
onClick = { ( ) => {
242
- setAnimateExit ( true ) ;
243
231
markNotificationRead ( notification ) ;
244
232
} }
245
233
>
0 commit comments