Skip to content

Commit c21d107

Browse files
committed
refactor: Transition app names from first and second app to host and guest
1 parent c20662e commit c21d107

File tree

16 files changed

+48
-72
lines changed

16 files changed

+48
-72
lines changed

test/e2e/multi-zone/app/apps/first/next.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/e2e/multi-zone/app/apps/first/pages/index.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

test/e2e/multi-zone/app/apps/first/tsconfig.json

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
basePath: '/guest',
3+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"version": "0.0.1",
33
"private": true,
4-
"name": "first-app"
4+
"name": "guest-app"
55
}

test/e2e/multi-zone/app/apps/second/pages/another/[slug].tsx renamed to test/e2e/multi-zone/app/apps/guest/pages/another/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default function Page() {
2-
return <p>hello from second app /another/[slug]</p>
2+
return <p>hello from guest app /another/[slug]</p>
33
}
44

55
export function getServerSideProps({ params }) {

test/e2e/multi-zone/app/apps/first/pages/blog/[slug].tsx renamed to test/e2e/multi-zone/app/apps/guest/pages/blog/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default function Page() {
2-
return <p>hello from first app /blog/[slug]</p>
2+
return <p>hello from guest app /blog/[slug]</p>
33
}
44

55
export function getServerSideProps({ params }) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { useEffect, useState } from 'react'
2+
3+
export default function Page() {
4+
const [date, setDate] = useState<Number>()
5+
6+
useEffect(() => {
7+
setDate(Date.now())
8+
}, [])
9+
10+
// this variable is edited by the test to verify HMR
11+
const editedContent = ''
12+
return (
13+
<>
14+
<p>hello from guest app</p>
15+
<div>{editedContent}</div>
16+
<div id="now">{`${date}`}</div>
17+
</>
18+
)
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"version": "0.0.1",
33
"private": true,
4-
"name": "second-app"
4+
"name": "host-app"
55
}

0 commit comments

Comments
 (0)