mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-25 07:38:17 +03:00
fix undefined route param error
This commit is contained in:
@@ -16,10 +16,9 @@ export default function ServerAddModal({route, navigation}) {
|
||||
const [serverAddress, setServerAddress] = useState('');
|
||||
|
||||
// add option to add server address when loading a share link
|
||||
const {address} = route.params;
|
||||
useEffect(() => {
|
||||
setServerAddress(address || '');
|
||||
}, [address]);
|
||||
setServerAddress(route.params?.address || '');
|
||||
}, [route.params]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
navigation.setOptions({
|
||||
|
||||
Reference in New Issue
Block a user