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:
siujamo
2026-05-12 09:08:37 +08:00
parent b2fea5df8e
commit 4b9c7d3e0d
4 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -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>()
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"