File tree Expand file tree Collapse file tree 1 file changed +26
-6
lines changed
src/BootstrapBlazor.Server/Components Expand file tree Collapse file tree 1 file changed +26
-6
lines changed Original file line number Diff line number Diff line change 1- <Router AppAssembly =" @typeof(Program).Assembly" NotFoundPage =" typeof(Pages.NotFound)" >
2- <Found Context =" routeData" >
3- <RouteView RouteData =" @routeData" DefaultLayout =" @typeof(MainLayout)" />
4- <FocusOnNavigate RouteData =" routeData" Selector =" h3" />
5- </Found >
6- </Router >
1+ @if (IsNet10OrGreater )
2+ {
3+ <Router AppAssembly =" @typeof(Program).Assembly" NotFoundPage =" typeof(Pages.NotFound)" >
4+ <Found Context =" routeData" >
5+ <RouteView RouteData =" @routeData" DefaultLayout =" @typeof(MainLayout)" />
6+ <FocusOnNavigate RouteData =" routeData" Selector =" h3" />
7+ </Found >
8+ </Router >
9+ }
10+ else
11+ {
12+ <Router AppAssembly =" @typeof(Program).Assembly" >
13+ <Found Context =" routeData" >
14+ <RouteView RouteData =" @routeData" DefaultLayout =" @typeof(MainLayout)" />
15+ <FocusOnNavigate RouteData =" routeData" Selector =" h3" />
16+ </Found >
17+ </Router >
18+ }
19+
20+ @code {
21+ #if NET10_0_OR_GREATER
22+ private bool IsNet10OrGreater => true ;
23+ #else
24+ private bool IsNet10OrGreater => false ;
25+ #endif
26+ }
You can’t perform that action at this time.
0 commit comments