Skip to content

Commit 1081c49

Browse files
committed
Fix installer without version number in URL
1 parent 63d13df commit 1081c49

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/App.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import classNames from "classnames";
22
import React, { useState } from "react";
33
import { IntlProvider } from "react-intl";
4-
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
4+
import {
5+
BrowserRouter as Router,
6+
Redirect,
7+
Route,
8+
Switch,
9+
} from "react-router-dom";
510
import CookiesConsent from "./components/cookiesconsent/CookiesConsent";
611
import Footer from "./components/footer/Footer";
712
import Header from "./components/header/Header";
@@ -22,9 +27,6 @@ import FullSimulator from "./pages/simulator/FullSimulator";
2227
import "./sass/omega.library.sass";
2328
import TiPlanetConnector from "./TiPlanetConnector";
2429

25-
26-
27-
2830
function App() {
2931
const getLang = () => {
3032
if (navigator.languages !== undefined) return navigator.languages[0];
@@ -75,7 +77,7 @@ function App() {
7577
/>
7678
<Route path="/releases" component={Releases} exact />
7779
{/* <Route path="/beta" component={Beta} exact /> */}
78-
<Route path="/install" component={Install} exact />
80+
<Redirect path="/install" to="/install/latest" exact />
7981
<Route path="/install/:version" component={Install} />
8082
<Route path="/policy" component={Policy} exact />
8183
<Route path="/archiving" component={Archiving} exact />

src/components/downloads/Downloads.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export class Downloads extends Component {
4141
{this.getReleaseVersion(latest_version.name)}
4242
</h2>
4343
<div className="download__cards">
44-
<Link to="/install" className="download__cards__card">
44+
<Link
45+
to="/install/latest"
46+
className="download__cards__card"
47+
>
4548
<span className="download__cards__card__icon">
4649
<i className="material-icons">system_update_alt</i>
4750
</span>

src/dfu/installer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { betas as betaReleases } from "../firmware/betas";
33
import {
44
Firmware,
55
releases as finalReleases,
6-
Releases
6+
Releases,
77
} from "../firmware/firmwares";
88
import Install from "../pages/Install";
99
import Downloader from "./downloader";
1010

11-
1211
// use JSON.parse(JSON.stringify()) to do a deep copy to avoid problems
1312
var releasesList: Releases = JSON.parse(JSON.stringify(finalReleases));
1413
releasesList["firmwares"] = releasesList.firmwares.concat(

0 commit comments

Comments
 (0)