Skip to content

Commit 64fb3cb

Browse files
committed
update domains
1 parent 1b8009d commit 64fb3cb

File tree

6 files changed

+19
-51
lines changed

6 files changed

+19
-51
lines changed

MyApp.Client/src/_posts/2023-02-01_javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ client.api(new Hello({ name }))
149149

150150
You'll typically use all these libraries in your **API-enabled** components as seen in the
151151
[HelloApi.tsx](https://github.com/NetCoreTemplates/react-spa/blob/main/MyApp.Client/src/_posts/components/HelloApi.tsx)
152-
component which calls the [Hello](https://react-spa.web-templates.io/ui/Hello) API on each key press:
152+
component which calls the [Hello](https://react-spa.react-templates.net/ui/Hello) API on each key press:
153153

154154
```tsx
155155
import { ChangeEvent, useState, useEffect } from "react"

MyApp.Client/src/_posts/2024-03-01_vite-press-plugin.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ When more capabilities are required and you want a .NET API backend to your Vite
4949
you can use one of our integrated .NET 8 SPA templates:
5050

5151
- [vue-spa](https://vue-spa.web-templates.io) - .NET 8 API with Vite Vue SPA frontend
52-
- [react-spa](https://react-spa.web-templates.io) - .NET 8 API with Vite React SPA frontend
52+
- [react-spa](https://react-spa.react-templates.net) - .NET 8 API with Vite React SPA frontend
5353

5454
<div class="not-prose mt-8 grid grid-cols-2 gap-4">
5555
<a class="block group border dark:border-gray-800 hover:border-indigo-700 dark:hover:border-indigo-700 flex flex-col justify-between" href="https://vue-spa.web-templates.io">
5656
<img class="p-2" src="https://raw.githubusercontent.com/ServiceStack/Assets/master/csharp-templates/vue-spa.png" />
5757
<div class="bg-gray-50 dark:bg-gray-800 text-gray-600 dark:text-gray-300 font-semibold group-hover:bg-indigo-700 group-hover:text-white text-center py-2">vue-spa.web-templates.io</div>
5858
</a>
59-
<a class="block group border dark:border-gray-800 hover:border-indigo-700 dark:hover:border-indigo-700 flex flex-col justify-between" href="https://react-spa.web-templates.io">
59+
<a class="block group border dark:border-gray-800 hover:border-indigo-700 dark:hover:border-indigo-700 flex flex-col justify-between" href="https://react-spa.react-templates.net">
6060
<img class="p-2" src="https://raw.githubusercontent.com/ServiceStack/Assets/master/csharp-templates/react-spa.png" />
61-
<div class="bg-gray-50 dark:bg-gray-800 text-gray-600 dark:text-gray-300 font-semibold group-hover:bg-indigo-700 group-hover:text-white text-center py-2">react-spa.web-templates.io</div>
61+
<div class="bg-gray-50 dark:bg-gray-800 text-gray-600 dark:text-gray-300 font-semibold group-hover:bg-indigo-700 group-hover:text-white text-center py-2">react-spa.react-templates.net</div>
6262
</a>
6363
</div>
6464

MyApp.Client/src/_posts/components/TemplateIndex.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ export const Index = [
2323
make('mvc-bootstrap', 'MVC', 'Windows',['bootstrap']),
2424
make('razor-bootstrap', 'Razor Pages', 'Razor',['bootstrap']),
2525
make('vue-mjs', 'Razor Pages', 'Razor',['tailwind','autoquery']),
26-
make('nextjs', 'Next.js', 'Nextjs',['tailwind','autoquery']),
26+
make('nextjs', 'Next.js', 'Nextjs',['tailwind','autoquery'], 'nextjs.react-templates.net'),
2727
make('vue-vite', 'Vue Vite', 'Vue',['tailwind','autoquery']),
2828
make('vue-ssg', 'Vue SSG', 'Vue',['tailwind','autoquery']),
2929
make('razor-pages', 'Razor Pages', 'Razor',['bootstrap']),
3030
make('mvcauth', 'MVC', 'Windows',['bootstrap']),
3131
make('script', 'MVC', 'Windows',['bootstrap']),
3232
make('vue-spa', 'Vue SPA', 'Vue',['bootstrap']),
33-
make('react-spa', 'React SPA', 'React',['bootstrap']),
33+
make('react-spa', 'React SPA', 'React',['tailwind','autoquery'], 'react-spa.react-templates.net'),
3434
make('angular-spa', 'Angular SPA', 'Angular',['bootstrap']),
3535
make('svelte-spa', 'Svelte SPA', 'Angular',['bootstrap']),
3636
].reduce((acc:{[name:string]:any}, template) => { acc[template.repo] = template; return acc}, {})

MyApp.Client/src/pages/bookings-custom.tsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { Link } from "react-router-dom"
88

99
function Index() {
1010
const { currency } = useFormatters()
11-
const [coupon, setCoupon] = useState<any>(null)
1211

1312
return (<Page title="Bookings CRUD (Custom Columns)" className="max-w-screen-lg">
1413

@@ -39,21 +38,6 @@ function Index() {
3938
createdBy: ({ createdBy }: any) => (
4039
<span dangerouslySetInnerHTML={{ __html: createdBy }} />
4140
),
42-
discount: ({ discount }: any) => (
43-
discount ? (
44-
<TextLink
45-
className="flex items-end"
46-
onClick={(e: React.MouseEvent) => {
47-
e.stopPropagation()
48-
setCoupon(discount)
49-
}}
50-
title={discount.id}
51-
>
52-
<Icon className="w-5 h-5 mr-1" type="Coupon" />
53-
<PreviewFormat value={discount.description} />
54-
</TextLink>
55-
) : null
56-
)
5741
}}
5842
headerSlots={{
5943
'roomNumber-header': () => (
@@ -68,15 +52,6 @@ function Index() {
6852
'createdBy-header': () => <>Employee</>
6953
}}
7054
/>
71-
72-
{coupon && (
73-
<AutoEditForm
74-
type="UpdateCoupon"
75-
value={coupon}
76-
onDone={() => setCoupon(null)}
77-
onSave={() => setCoupon(null)}
78-
/>
79-
)}
8055

8156
<div className="mt-4 text-center text-gray-400 flex justify-center -ml-6">
8257
<SrcPage path="bookings-custom.tsx"/>

MyApp.Client/vite.config.ts.orig

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,14 @@ if (isDevServer) {
7272
const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` :
7373
env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'https://localhost:5001';
7474
const apiUrl = process.env.NODE_ENV === 'development' ? target : ''
75-
const baseUrl = process.env.NODE_ENV === 'development'
76-
? "https://locahost:5173"
77-
: process.env.DEPLOY_HOST ? `https://${process.env.DEPLOY_HOST}` : undefined
75+
76+
// Only required if accessing vite directly, e.g. http://localhost:5173
77+
const proxy = {
78+
'^/api': {
79+
target,
80+
secure: false
81+
}
82+
}
7883

7984
// https://vitejs.dev/config/
8085
export default defineConfig(async () => {
@@ -104,7 +109,7 @@ export default defineConfig(async () => {
104109
react(),
105110
tailwindcss(),
106111
Press({
107-
baseUrl,
112+
baseUrl: target,
108113
//Uncomment to generate metadata *.json
109114
//metadataPath: './public/api',
110115
}),
@@ -118,19 +123,7 @@ export default defineConfig(async () => {
118123
target: 'baseline-widely-available',
119124
},
120125
server: {
121-
proxy: {
122-
'^/api': {
123-
target,
124-
secure: false
125-
}
126-
},
127-
port: 5173,
128-
...(fs.existsSync(keyFilePath) && fs.existsSync(certFilePath) ? {
129-
https: {
130-
key: fs.readFileSync(keyFilePath),
131-
cert: fs.readFileSync(certFilePath),
132-
}
133-
} : {})
134-
}
126+
proxy,
127+
}
135128
}
136129
})

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.NET 8.0 react-spa Pages Tailwind Website
44

5-
[![](https://raw.githubusercontent.com/ServiceStack/Assets/master/csharp-templates/react-spa.png)](http://react-spa.web-templates.io)
5+
[![](https://raw.githubusercontent.com/ServiceStack/Assets/master/csharp-templates/react-spa.png)](http://react-spa.react-templates.net)
66

7-
> Browse [source code](https://github.com/NetCoreTemplates/react-spa), view live demo [react-spa.web-templates.io](http://react-spa.web-templates.io) and install with [dotnet-new](https://docs.servicestack.net/dotnet-new):
7+
> Browse [source code](https://github.com/NetCoreTemplates/react-spa), view live demo [react-spa.react-templates.net](http://react-spa.react-templates.net) and install with [dotnet-new](https://docs.servicestack.net/dotnet-new):
88
99
$ dotnet tool install -g x
1010

0 commit comments

Comments
 (0)