feat: 添加测试框架和优化项目结构
- 添加 Jest 配置和测试设置 - 添加 use-categories hook 的单元测试 - 更新 CLAUDE.md 添加包管理工具说明 - 优化首页、视频页和频道页的组件结构 - 添加 .claude 命令配置文件 - 移除 bun.lock 和 package-lock.json,统一使用 bun - 更新 package.json 依赖 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useState } from 'react'
|
||||
import {
|
||||
View,
|
||||
Text,
|
||||
@@ -30,11 +30,6 @@ export default function ChannelsScreen() {
|
||||
// 从路由参数获取当前选中的分类 ID
|
||||
const currentCategoryId = params.categoryId as string | undefined
|
||||
|
||||
useEffect(() => {
|
||||
// 加载分类数据
|
||||
load()
|
||||
}, [])
|
||||
|
||||
// 使用接口返回的分类数据
|
||||
const categories = categoriesData?.categories || []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user