增加WASM模块上下文。
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
import { isNil } from 'lodash-es';
|
||||
import { useEffect } from 'react';
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
import { useScheme } from '../stores/schemes';
|
||||
|
||||
export function SchemeDetail() {
|
||||
return <div></div>;
|
||||
const { id } = useParams();
|
||||
const scheme = useScheme(id);
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
if (isNil(scheme)) {
|
||||
navigate('../not-found');
|
||||
}
|
||||
}, [scheme, navigate]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h3>{scheme?.name}</h3>
|
||||
<p>{scheme?.description}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user