|
@@ -16,6 +16,9 @@ const CaseListWidget = ({ word }: IWidget) => {
|
|
|
const [caseData, setCaseData] = useState<ICaseListData[]>();
|
|
const [caseData, setCaseData] = useState<ICaseListData[]>();
|
|
|
const [count, setCount] = useState<number>();
|
|
const [count, setCount] = useState<number>();
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
|
+ if (typeof word === "undefined") {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
get<ICaseListResponse>(`/v2/case/${word}`).then((json) => {
|
|
get<ICaseListResponse>(`/v2/case/${word}`).then((json) => {
|
|
|
console.log("case", json);
|
|
console.log("case", json);
|
|
|
if (json.ok) {
|
|
if (json.ok) {
|