refactor: move typed Redux hooks from src/store/hooks.ts to src/hooks/store.ts
Also update GitHub repository URLs and labels in hero layout.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useDispatch, useSelector } from "react-redux"
|
||||
import type { AppDispatch, RootState } from "./index"
|
||||
import type { AppDispatch, RootState } from "@/store"
|
||||
|
||||
export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
|
||||
export const useAppSelector = useSelector.withTypes<RootState>()
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
LoginOutlined,
|
||||
} from "@ant-design/icons"
|
||||
import { AuthApi } from "@/api"
|
||||
import { useAppDispatch, useAppSelector } from "@/store/hooks"
|
||||
import { useAppDispatch, useAppSelector } from "@/hooks/store"
|
||||
import { clearCurrentUser } from "@/store/auth-slice"
|
||||
import { useState } from "react"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from "react"
|
||||
import { useNavigate } from "react-router-dom"
|
||||
import { App, Button, Card, Form, Input, Typography } from "antd"
|
||||
import { AuthApi } from "@/api"
|
||||
import { useAppDispatch } from "@/store/hooks"
|
||||
import { useAppDispatch } from "@/hooks/store"
|
||||
import { setCurrentUser } from "@/store/auth-slice"
|
||||
import { LoginRequest } from "@/types"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user