refactor: 优化代码和添加类型检查脚本

- 统一 OWNER_ID 导入,从 lib/auth 导入而非环境变量
- 添加 type-checks 脚本用于 TypeScript 类型检查
- 对接 my 页面后端接口,使用 useTemplateGenerations
- 添加 MySkeleton 骨架屏组件
- 添加下拉刷新功能
- 添加空状态提示文案

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
imeepos
2026-01-16 12:34:27 +08:00
parent 755a374b67
commit 4270973652
8 changed files with 205 additions and 168 deletions

View File

@@ -4,9 +4,9 @@ import { useState } from 'react'
import { type ApiError } from '@/lib/types'
import { OWNER_ID } from '@/lib/auth'
import { handleError } from './use-error'
const OWNER_ID = process.env.EXPO_PUBLIC_OWNER_ID || ''
export const useActivates = () => {
const [loading, setLoading] = useState<boolean>(false)

View File

@@ -4,9 +4,9 @@ import { useState } from 'react'
import { type ApiError } from '@/lib/types'
import { OWNER_ID } from '@/lib/auth'
import { handleError } from './use-error'
const OWNER_ID = process.env.EXPO_PUBLIC_OWNER_ID || ''
export const useCategories = () => {
const [loading, setLoading] = useState<boolean>(false)

View File

@@ -11,7 +11,6 @@ import { type ApiError } from '@/lib/types'
import { handleError } from './use-error'
const OWNER_ID = process.env.EXPO_PUBLIC_OWNER_ID || ''
export const useTemplateGenerations = () => {
const [loading, setLoading] = useState(false)
@@ -106,3 +105,4 @@ export const useTemplateGenerations = () => {
}
export type { TemplateGeneration }