<ThemeProvider theme={theme}>
<AppBox>
<Container>
<Switch>
<Route path="/main" component={MainPage} />
<Route exact path="/card" component={CardPage} />
<Route exact path="/cabinet" component={CabinetPage} />
<Redirect from="/" to="/main" />
</Switch>
</Container>
</AppBox>
</ThemeProvider>
function App() {
return (
<ThemeProvider theme="light">
<MyComponent>
<MyComponent1>
<SubComponent1>
<Button1 />
</SubComponent1>
</MyComponent1>
<MyComponent2>
<SubComponent2>
<Button2 />
</SubComponent2>
</MyComponent2>
<MyComponent3>
<SubComponent3>
<Button3 />
</SubComponent3>
</MyComponent3>
</MyComponent>
</ThemeProvider>
);
}