@@ -43,7 +43,7 @@ export const NewSubscription: FC<{ onClose: () => void }> = ({ onClose }) => {
4343 const [ newLink , setNewLink ] = useState ( '' )
4444 const [ showWrongSubscriptionNameMessage , setShowWrongSubscriptionNameMessage ] = useState ( false )
4545 const queryClient = useQueryClient ( )
46- const handleAddSubscription = useMutation ( {
46+ const addSubscription = useMutation ( {
4747 mutationFn,
4848 onSuccess : ( ) => {
4949 queryClient . invalidateQueries ( { queryKey : [ 'subscriptions' ] } ) . then ( onClose )
@@ -59,7 +59,7 @@ export const NewSubscription: FC<{ onClose: () => void }> = ({ onClose }) => {
5959 if ( ! isValidated ) {
6060 setShowWrongSubscriptionNameMessage ( true )
6161 } else {
62- handleAddSubscription . mutate ( {
62+ addSubscription . mutate ( {
6363 methodName : 'addSubscription' ,
6464 params : {
6565 source : 'reddit' , // ToDo: hardcoded
@@ -92,11 +92,11 @@ export const NewSubscription: FC<{ onClose: () => void }> = ({ onClose }) => {
9292 className = { `flex h-8 w-15 shrink-0 cursor-pointer items-center justify-center gap-1 rounded-[10px] bg-(--color-green) text-xs/[100%] font-normal text-(--color-opposite-text) capitalize dark:bg-(--color-main-text) dark:text-(--color-opposite-text)` }
9393 disabled = {
9494 showWrongSubscriptionNameMessage ||
95- handleAddSubscription . isPending ||
96- handleAddSubscription . isSuccess
95+ addSubscription . isPending ||
96+ addSubscription . isSuccess
9797 }
9898 >
99- { handleAddSubscription . isPending || handleAddSubscription . isSuccess ? (
99+ { addSubscription . isPending || addSubscription . isSuccess ? (
100100 < Spinner />
101101 ) : (
102102 < >
@@ -109,8 +109,8 @@ export const NewSubscription: FC<{ onClose: () => void }> = ({ onClose }) => {
109109 className = "mr-1 flex cursor-pointer p-1.5 text-[#7A818B] transition hover:not-disabled:text-(--color-main-text)"
110110 disabled = {
111111 showWrongSubscriptionNameMessage ||
112- handleAddSubscription . isPending ||
113- handleAddSubscription . isSuccess
112+ addSubscription . isPending ||
113+ addSubscription . isSuccess
114114 }
115115 onClick = { ( ) => {
116116 setNewLink ( '' )
0 commit comments