... ); }; export default OngoingPage;"> ... ); }; export default OngoingPage;"> ... ); }; export default OngoingPage;">

Untitled

const OngoingPage = () => {
  const { txHash } = useSelector(selectTxHashSlice);

  return (
    <PageWrapper title="Transaction in progress">
     ...
    </PageWrapper>
  );
};

export default OngoingPage;
const initialState: TxHashState = {
  txHash: ``,
  txStatus: `idle`,
};

const txHashSlice = createSlice({
  name: `txHash`,
  initialState,
  reducers: {
    setTxHash: (state, action) => {
      state.txHash = action.payload;
    },
    setTxStatus: (state, action) => {
      state.txStatus = action.payload;
    },
  },
});

// 이 부분이 문제!!
export const selectTxHashSlice = (state: RootState): TxHashState => state.txHash;

// 수정
=> 
export const selectTxHashSlice = (state: RootState): TxHashState => state;

Cannot destructure property react.js useSelector