mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 06:32:11 +00:00
use one time binding for homePath and viewsConfig in Router
This commit is contained in:
parent
a9eaf1c7d2
commit
da74ec2f1b
1 changed files with 2 additions and 1 deletions
|
|
@ -4,7 +4,8 @@ const UrlUtils = require('url');
|
|||
const { RoutesContainerProvider } = require('../RoutesContainerContext');
|
||||
const Route = require('./Route');
|
||||
|
||||
const Router = ({ homePath, viewsConfig, onPathNotMatch }) => {
|
||||
const Router = ({ onPathNotMatch, ...props }) => {
|
||||
const [{ homePath, viewsConfig }] = React.useState(props);
|
||||
const [views, setViews] = React.useState(() => {
|
||||
return Array(viewsConfig.length).fill({
|
||||
routeConfig: null,
|
||||
|
|
|
|||
Loading…
Reference in a new issue