-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
I have defined the interface of props of a functional component in a separate file and was trying to use it, but the "Is missing in props validation" error was thrown.
const RouteList: React.FC<routeListProps> = ({
routes,
error,
}: routeListProps) => {
const styles = useStyleConfig("ReactWindow", {});
const {
globalState: { selectedRoutePath },
changeRoute,
} = GlobalStore.useContainer();
const Row = ({ index, style }: rowParameters) => {
if (routes.length == 0) return null;
const { entity_name, chain_name, status } = routes[index];
const rowStyles = useStyleConfig("Row", {
variant: selectedRoutePath == chain_name ? "active" : "",
});
);
);
};
export default RouteList;
export interface routeResponse {
chain_name: string;
entity_name: string;
status: string;
}
export interface routeListProps {
routes: routeResponse[];
error: string | undefined;
}
bryanhitc
