diff --git a/src/forge/SecuritySetting/sub/SSH.jsx b/src/forge/SecuritySetting/sub/SSH.jsx index dbaad9d9..b46fb262 100644 --- a/src/forge/SecuritySetting/sub/SSH.jsx +++ b/src/forge/SecuritySetting/sub/SSH.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useState , useEffect } from 'react'; import { Button , List , Pagination , Skeleton } from 'antd'; import miyao from '../img/miyao_middle_icon.png'; import axios from 'axios'; @@ -15,9 +15,9 @@ function SSH(props) { const [ visibleDesc , setVisibleDesc ] = useState(false); const [ content , setContent ] = useState(undefined); - useState(()=>{ + useEffect(()=>{ Init(); - },[]) + },[page]) function Init() { const url = `/public_keys.json`;