Not able to perform redirection to a URL

I want to redirect to a specific URL onSubmit of a Form. I tried various solutions but nothing worked for me. Can someone please help me with this.

Hi @AnjaliChaudhary ,

To redirect to a specific URL on submit, you’ll need to use a CustomUI navigate method.

Here is an example of the static App.js file with an upload file form.

I’ve installed this app in Confluence and the router.navigate('/wiki'); line navigates to the Confluence home page after the form has been submitted.

import React, { useState } from 'react';
import { router } from '@forge/bridge';

function App() {
  const [selectedFile, setSelectedFile] = useState();
  const [isSelected, setIsSelected] = useState(false);

  const changeHandler = (event) => {


  // Handles form submission, which is a good place to call APIs, or to set component state...
  const handleSubmission = () => {


  return (
      <input type="file" name="file" onChange={changeHandler} />
      {isSelected ? (
					<p>Filename: {}</p>
					<p>Filetype: {selectedFile.type}</p>
					<p>Size in bytes2: {selectedFile.size}</p>
						lastModifiedDate:{' '}
			) : (
				<p>Select a file to show details</p>
				<button onClick={handleSubmission}>Submit</button>

export default App;

There is a tutorial here for getting started with a Custom UI app in Forge.