web: submit page navigates to newly created submission
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f629ac2998
commit
d584ee2c03
@ -17,6 +17,9 @@ interface SubmissionPayload {
|
||||
AssetVersion: number;
|
||||
SubmissionType: number;
|
||||
}
|
||||
interface IdResponse {
|
||||
ID: number;
|
||||
}
|
||||
|
||||
export default function SubmissionInfoPage() {
|
||||
const [game, setGame] = useState(1);
|
||||
@ -49,9 +52,11 @@ export default function SubmissionInfoPage() {
|
||||
});
|
||||
|
||||
// Allow any HTTP status
|
||||
const responseText = await response.text();
|
||||
const id_response:IdResponse = await response.json();
|
||||
|
||||
// navigate to newly created submission
|
||||
window.location.assign(`/submissions/${id_response.ID}`)
|
||||
|
||||
console.log("Response Text:", responseText);
|
||||
} catch (error) {
|
||||
console.error("Error submitting data:", error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user