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