-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start migrating to server components (breaking)
- Loading branch information
1 parent
b3986af
commit 8b31409
Showing
25 changed files
with
236 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 18 additions & 1 deletion
19
browser/create-template/templates/nextjs-site/src/app/[...slug]/error.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
"use client"; | ||
'use client'; | ||
|
||
import Container from '@/components/Layout/Container'; | ||
|
||
export default function Error({ | ||
error, | ||
}: { | ||
error: Error & { digest?: string }; | ||
}) { | ||
return ( | ||
<Container> | ||
<h1>{error.name}</h1> | ||
<p> | ||
Go to <a href='/'>home</a> | ||
</p> | ||
</Container> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
browser/create-template/templates/nextjs-site/src/app/context/CurrentSubjectContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use client'; | ||
|
||
import { env } from '@/env'; | ||
import { createContext, useContext, useState } from 'react'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
browser/create-template/templates/nextjs-site/src/app/store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { env } from '@/env'; | ||
import { Store } from '@tomic/lib'; | ||
|
||
export const store = new Store({ | ||
serverUrl: env.NEXT_PUBLIC_ATOMIC_SERVER_URL, | ||
}); |
13 changes: 4 additions & 9 deletions
13
browser/create-template/templates/nextjs-site/src/atomic/getCurrentResource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
browser/create-template/templates/nextjs-site/src/components/Image.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use client'; | ||
|
||
import { Image as AtomicImage } from '@tomic/react'; | ||
|
||
export const Image = ({ subject, alt }: { subject: string; alt: string }) => { | ||
return <AtomicImage subject={subject} alt={alt} />; | ||
}; |
26 changes: 13 additions & 13 deletions
26
browser/create-template/templates/nextjs-site/src/components/Layout/HStack.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 17 additions & 18 deletions
35
browser/create-template/templates/nextjs-site/src/components/Navbar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 1 addition & 9 deletions
10
browser/create-template/templates/nextjs-site/src/components/ProviderWrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
browser/create-template/templates/nextjs-site/src/components/Searchbar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
browser/create-template/templates/nextjs-site/src/instrumentation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export async function register() { | ||
const ontologies = await import('@/ontologies'); | ||
ontologies.initOntologies(); | ||
} |
20 changes: 10 additions & 10 deletions
20
browser/create-template/templates/nextjs-site/src/views/Block/BlockView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 13 additions & 9 deletions
22
browser/create-template/templates/nextjs-site/src/views/Block/ImageGalleryBlock.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
browser/create-template/templates/nextjs-site/src/views/Block/TextBlock.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
browser/create-template/templates/nextjs-site/src/views/DefaultView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.