|
|
@@ -4,9 +4,6 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
import type { XunlianCode } from "../share/types_stock.ts";
|
|
|
import { useNavigate } from "react-router";
|
|
|
import { XunlianCodeAPI } from "./api/xunlian_codes.ts";
|
|
|
-import { useAuth } from "./hooks.tsx";
|
|
|
-import { TeacherView } from "./components/Classroom/TeacherView.tsx";
|
|
|
-import { StudentView } from "./components/Classroom/StudentView.tsx";
|
|
|
|
|
|
export function XunlianPage() {
|
|
|
const [visibleStocks, setVisibleStocks] = useState<Record<number, boolean>>({});
|
|
|
@@ -32,12 +29,6 @@ export function XunlianPage() {
|
|
|
navigate(`/mobile/stock?code=${code.code}`);
|
|
|
};
|
|
|
|
|
|
- const { user } = useAuth();
|
|
|
-
|
|
|
- if (user?.role === 'admin') {
|
|
|
- return <TeacherView />;
|
|
|
- }
|
|
|
-
|
|
|
return (
|
|
|
<div className="p-4">
|
|
|
<div className="flex justify-between items-center mb-4">
|