Why does my R code not work?

Screen Link:

My Code:

states_function<-function(x){
  y=case_when(
    x=="TX"~ "Texas", 
    x=="NY" ~"New York",
    x=="FL"~"Florida",
    x=="CA"~"California",
    TRUE ~ y
  )
}

book_reviews<-book_reviews%>%mutate(new_states_list=unlist(map(state, states_function)))

What I expected to happen:
I thought I could map the function to the new column ie. new_states_list.

What actually happened:

Error: Problem with `mutate()` input `new_states_list`. x object 'y' not found ℹ Input `new_states_list` is `unlist(map(state, states_function))`.

May i know what went wrong? Why was I getting the error, and why can’t I seem to map it to the function? Thanks!