File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ import { useIsOpened } from "./use-is-opened";
55
66export type RouteViewConfig < Props , Params > = {
77 route : RouteInstance < Params > | RouteInstance < Params > [ ] ;
8- view : React . FC < Props > ;
9- otherwise ?: React . FC < Props > ;
8+ view : React . ComponentType < Props > ;
9+ otherwise ?: React . ComponentType < Props > ;
1010} ;
1111
1212export const createRouteView = <
Original file line number Diff line number Diff line change 1- import React , { FC } from "react" ;
1+ import React from "react" ;
22import { RouteInstance } from "atomic-router" ;
33
44import { useIsOpened } from "./use-is-opened" ;
55
66type RouteRecord < Props , Params > = {
77 route : RouteInstance < Params > | RouteInstance < Params > [ ] ;
8- view : FC < Props > ;
8+ view : React . ComponentType < Props > ;
99} ;
1010
1111export type RoutesViewConfig = {
1212 routes : RouteRecord < any , any > [ ] ;
13- otherwise ?: React . FC < any > ;
13+ otherwise ?: React . ComponentType < any > ;
1414} ;
1515
1616export const createRoutesView = < Config extends RoutesViewConfig > ( config : Config ) => {
Original file line number Diff line number Diff line change 1- import React , { FC } from ' react' ;
2- import { RouteInstance , RouteParams } from ' atomic-router' ;
1+ import React from " react" ;
2+ import { RouteInstance , RouteParams } from " atomic-router" ;
33
4- import { useIsOpened } from ' ./use-is-opened' ;
4+ import { useIsOpened } from " ./use-is-opened" ;
55
66type Props < Params extends RouteParams > = {
77 route : RouteInstance < Params > | RouteInstance < Params > [ ] ;
8- view : FC ;
8+ view : React . ComponentType ;
99} ;
1010
1111export function Route < Params > ( { route, view : Component } : Props < Params > ) {
You can’t perform that action at this time.
0 commit comments