Skip to content

Commit 55cc69e

Browse files
Fixups
1 parent e5c8f97 commit 55cc69e

5 files changed

Lines changed: 19 additions & 11 deletions

File tree

CodeConverter.slnLaunch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[
22
{
3-
"Name": "Func \u002B Web",
3+
"Name": "Func + Web",
44
"Projects": [
55
{
6-
"Name": "Web\\Web.csproj",
6+
"Path": "Func\\Func.csproj",
77
"Action": "Start"
88
},
99
{
10-
"Name": "Func\\Func.csproj",
11-
"Action": "Start"
10+
"Path": "Web\\web.esproj",
11+
"Action": "StartWithoutDebugging"
1212
}
1313
]
1414
}

Update-NpmPackages.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$null = & npm install -g npm-check-updates@latest
2-
Push-Location './Web/ClientApp'
2+
Push-Location './Web'
33
try {
44
& npm-check-updates -u
55
& npm install --audit false

web/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"name": "codeconverter",
3-
"version": "0.1.0",
3+
"version": "10.0.0",
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"prestart": "node aspnetcore-https.cjs && node aspnetcore-react.cjs",
87
"dev": "vite",
98
"start": "vite",
109
"build": "tsc && vite build",

web/src/main.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import 'bootstrap/dist/css/bootstrap.css';
12
import { StrictMode } from 'react'
23
import { createRoot } from 'react-dom/client'
3-
import './index.css'
4+
import { BrowserRouter } from 'react-router-dom'
45
import App from './App.tsx'
56

7+
// Set the API source in the document head for the API module to read
8+
const headElement = document.head as HTMLElement & { dataset: DOMStringMap };
9+
headElement.dataset['apisource'] = import.meta.env.VITE_DEFAULT_APISOURCE || 'LocalWeb';
10+
11+
const baseUrl = document.getElementsByTagName('base')[0]?.getAttribute('href') || undefined;
12+
613
createRoot(document.getElementById('root')!).render(
714
<StrictMode>
8-
<App />
15+
<BrowserRouter basename={baseUrl}>
16+
<App />
17+
</BrowserRouter>
918
</StrictMode>,
1019
)

0 commit comments

Comments
 (0)