Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 17e5652

Browse files
committed
Revert #380
1 parent 77bd9b1 commit 17e5652

File tree

10 files changed

+19
-40
lines changed

10 files changed

+19
-40
lines changed

examples/anchor-links/app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import React from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
1+
import React, { FC } from 'react'
32

43
const links = {
54
'Home': '/',
@@ -14,7 +13,7 @@ const links = {
1413
'Dark Green': '/colors/darkgreen?text=orange',
1514
}
1615

17-
export default function App({ Page, pageProps }: AppProps) {
16+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
1817
return (
1918
<main>
2019
<head>

examples/css-modules/app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React, { ComponentType } from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
1+
import React, { FC } from 'react'
32

4-
export default function App({ Page, pageProps }: AppProps) {
3+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
54
return (
65
<main>
76
<head>

examples/hello-world-spa/app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
1+
import React, { FC } from 'react'
32

4-
export default function App({ Page, pageProps }: AppProps) {
3+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
54
return (
65
<main>
76
<head>

examples/hello-world/app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
1+
import React, { FC } from 'react'
32

4-
export default function App({ Page, pageProps }: AppProps) {
3+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
54
return (
65
<main>
76
<head>

examples/markdown-pages/app.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
import React, { ComponentType } from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
3-
1+
import React, { FC } from 'react'
2+
import './style/index.css'
43

54
type Metadata = {
65
title?: string
7-
url?: string
86
}
97

10-
export default function App({ Page, pageProps }: AppProps<Record<string, any>, { meta: Metadata }>) {
8+
export default function App({ Page, pageProps }: { Page: FC & { meta: Metadata }, pageProps: any }) {
119
return (
1210
<main>
1311
<head>
1412
<title>{Page.meta.title}</title>
15-
<link rel="stylesheet" href="./style/index.css" />
1613
</head>
1714
<Page {...pageProps} />
1815
</main>

examples/markdown-pages/pages/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
2-
title: Aleph.js
3-
url: https://alephjs.org
4-
id: doc-page-welcome
5-
className: doc-page
2+
title: Welcome to use Aleph.js!
3+
className: markdown-page
64
style:
75
padding: '45px 90px'
86
border: '1px solid #eee'

examples/three-fiber/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, { ComponentType } from 'react'
1+
import React, { FC } from 'react'
22
import './style/index.css'
33

4-
export default function App({ Page, pageProps }: { Page: ComponentType<any>, pageProps: any }) {
4+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
55
return (
66
<main>
77
<head>

examples/windicss/app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
1+
import React, { FC } from 'react'
32

4-
export default function App({ Page, pageProps }: AppProps) {
3+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
54
return (
65
<main>
76
<head>

examples/with-src-dir/src/app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React from 'react'
2-
import { AppProps } from 'aleph/types.d.ts'
1+
import React, { FC } from 'react'
32

4-
export default function App({ Page, pageProps }: AppProps) {
3+
export default function App({ Page, pageProps }: { Page: FC, pageProps: any }) {
54
return (
65
<main>
76
<head>

types.d.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type { ComponentType } from 'https://esm.sh/[email protected]'
2-
31
/**
42
* An interface that aligns to the parts of the `Aleph` class.
53
*/
@@ -330,11 +328,3 @@ export type RouterURL = {
330328
push(url: string): void
331329
replace(url: string): void
332330
}
333-
334-
/**
335-
* Custom `App` props
336-
*/
337-
export interface AppProps<P extends Record<string, any> = Record<string, any>, T extends {} = {}> {
338-
pageProps: P
339-
Page: ComponentType<P> & T
340-
}

0 commit comments

Comments
 (0)