add 02011702
This commit is contained in:
parent
2bd1941bd8
commit
d30acd8e55
|
@ -0,0 +1,7 @@
|
|||
export function coursePreviewAllmsg() {
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
helloword
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
export function CoursePreview(){
|
||||
return(
|
||||
<div className="min-h-screen">
|
||||
helloword
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
import { Checkbox, Divider, Radio, Space } from 'antd';
|
||||
import { Checkbox, Divider, Radio, Space , Spin} from 'antd';
|
||||
import { categories, levels } from '../mockData';
|
||||
import { TaxonomySlug, TermDto } from '@nice/common';
|
||||
import { GetTaxonomyProps, useGetTaxonomy } from '@web/src/hooks/useGetTaxonomy';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
interface FilterSectionProps {
|
||||
selectedCategory: string;
|
||||
|
@ -14,6 +17,12 @@ export default function FilterSection({
|
|||
onCategoryChange,
|
||||
onLevelChange,
|
||||
}: FilterSectionProps) {
|
||||
const gateGory : GetTaxonomyProps = useGetTaxonomy({
|
||||
type: TaxonomySlug.CATEGORY,
|
||||
})
|
||||
const levels : GetTaxonomyProps = useGetTaxonomy({
|
||||
type: TaxonomySlug.LEVEL,
|
||||
})
|
||||
return (
|
||||
<div className="bg-white p-6 rounded-lg shadow-sm space-y-6">
|
||||
<div>
|
||||
|
@ -23,12 +32,21 @@ export default function FilterSection({
|
|||
onChange={(e) => onCategoryChange(e.target.value)}
|
||||
className="flex flex-col space-y-3"
|
||||
>
|
||||
<Radio value="">全部课程</Radio>
|
||||
{categories.map(category => (
|
||||
<Radio key={category} value={category}>
|
||||
{category}
|
||||
</Radio>
|
||||
))}
|
||||
{
|
||||
gateGory.isLoading?
|
||||
(<Spin/>)
|
||||
:
|
||||
(
|
||||
<>
|
||||
<Radio value="">全部课程</Radio>
|
||||
{gateGory.categories.map(category => (
|
||||
<Radio key={category} value={category}>
|
||||
{category}
|
||||
</Radio>
|
||||
))}
|
||||
</>)
|
||||
}
|
||||
|
||||
</Radio.Group>
|
||||
</div>
|
||||
|
||||
|
@ -41,14 +59,23 @@ export default function FilterSection({
|
|||
onChange={(e) => onLevelChange(e.target.value)}
|
||||
className="flex flex-col space-y-3"
|
||||
>
|
||||
<Radio value="">全部难度</Radio>
|
||||
{levels.map(level => (
|
||||
<Radio key={level} value={level}>
|
||||
{level}
|
||||
</Radio>
|
||||
))}
|
||||
{
|
||||
levels.isLoading ?
|
||||
(<Spin/>)
|
||||
:
|
||||
(
|
||||
<>
|
||||
<Radio value="">全部难度</Radio>
|
||||
{levels.categories.map(level => (
|
||||
<Radio key={level} value={level}>
|
||||
{level}
|
||||
</Radio>
|
||||
))}
|
||||
</>)
|
||||
}
|
||||
|
||||
</Radio.Group>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue