[FA-11] Fix build errors, try to fix cache miss on node build
Some checks failed
CI / build-backend (pull_request) Failing after 1m11s
CI / build-frontend (pull_request) Has been cancelled

This commit is contained in:
gamer147
2025-11-26 00:40:07 -05:00
parent c6d794aabc
commit ba99642e97
9 changed files with 12 additions and 12 deletions

View File

@@ -6,7 +6,7 @@ import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
globalIgnores(['dist', 'src/__generated__']),
{
files: ['**/*.{ts,tsx}'],
extends: [

View File

@@ -6,7 +6,7 @@ const uri = import.meta.env.VITE_GRAPHQL_URI ?? 'https://localhost:5001/graphql'
const httpLink = new HttpLink({ uri })
const authLink = new SetContextLink(async ({ headers }, _) => {
const authLink = new SetContextLink(async ({ headers }) => {
if (!userManager) return { headers }
try {
const user = await userManager.getUser()

View File

@@ -14,12 +14,11 @@ const AuthContext = createContext<AuthContextValue | undefined>(undefined)
export function AuthProvider({ children }: { children: ReactNode }) {
const [user, setUser] = useState<User | null>(null)
const [isLoading, setIsLoading] = useState(true)
const [isLoading, setIsLoading] = useState(!!userManager)
const callbackHandledRef = useRef(false)
useEffect(() => {
if (!userManager) {
setIsLoading(false)
return
}
@@ -121,6 +120,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>
}
// eslint-disable-next-line react-refresh/only-export-components
export function useAuth() {
const context = useContext(AuthContext)
if (!context) {

View File

@@ -31,4 +31,5 @@ function Badge({ className, variant, ...props }: BadgeProps) {
)
}
// eslint-disable-next-line react-refresh/only-export-components
export { Badge, badgeVariants }

View File

@@ -51,4 +51,5 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
)
Button.displayName = 'Button'
// eslint-disable-next-line react-refresh/only-export-components
export { Button, buttonVariants }

View File

@@ -2,8 +2,7 @@ import * as React from 'react'
import { cn } from '../../lib/utils'
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {

View File

@@ -13,14 +13,13 @@ export function NovelsPage() {
notifyOnNetworkStatusChange: true,
})
const edges = data?.novels?.edges ?? []
const pageInfo = data?.novels?.pageInfo
const hasNextPage = pageInfo?.hasNextPage ?? false
const endCursor = pageInfo?.endCursor ?? null
const novels = useMemo(
() => edges.map((edge) => edge?.node).filter(Boolean),
[edges]
() => (data?.novels?.edges ?? []).map((edge) => edge?.node).filter(Boolean),
[data?.novels?.edges]
)
async function handleLoadMore() {