-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nextjs-scheduler example and bump up examples to v0.4.7 (#106)
* Bump up examples to v0.4.7 * Add nextjs-scheduler example * Prevent fileinfo being overwritten with null when selecting a file --------- Co-authored-by: blurfx <[email protected]>
- Loading branch information
1 parent
eab9f38
commit a3110a2
Showing
12 changed files
with
113 additions
and
18 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,69 @@ | ||
import { NextPage } from 'next'; | ||
import Head from 'next/head'; | ||
import { ExampleLayout } from '@/components'; | ||
import { | ||
Sidebar, | ||
BasicExampleView, | ||
ProjectCodes, | ||
COMMON_IGNORE_FILES, | ||
EXAMPLE_CODE_URL, | ||
EXAMPLE_PREVIEW_URL, | ||
} from '@/components/exampleView'; | ||
import { FILE_INFO } from '@/examples/nextjs-scheduler/fileInfo'; | ||
|
||
const exampleKey = 'nextjs-scheduler'; | ||
const exampleTitle = 'Calendar'; | ||
|
||
const CalendarExampleView: NextPage = () => { | ||
return ( | ||
<ExampleLayout breadcrumbTitle={exampleTitle}> | ||
{() => ( | ||
<> | ||
<Head> | ||
<title>{`${exampleTitle} · Yorkie Examples`}</title> | ||
</Head> | ||
<Sidebar wide> | ||
<Sidebar.Tabs defaultTab="code"> | ||
<Sidebar.Top> | ||
<Sidebar.TabsList> | ||
<Sidebar.TabsTab value="code">Code</Sidebar.TabsTab> | ||
</Sidebar.TabsList> | ||
</Sidebar.Top> | ||
<Sidebar.TabsPanel value="code"> | ||
<Sidebar.GuideTitle>{exampleTitle}</Sidebar.GuideTitle> | ||
<Sidebar.GuideDescription> | ||
This demo shows the real-time collaborative version of the{' '} | ||
<a href="https://quilljs.com/" className="link" target="_blank" rel="noreferrer"> | ||
Quill | ||
</a>{' '} | ||
editor with{' '} | ||
<a href="https://yorkie.dev/" className="link" target="_blank" rel="noreferrer"> | ||
Yorkie | ||
</a>{' '} | ||
and{' '} | ||
<a href="https://vitejs.dev/" className="link" target="_blank" rel="noreferrer"> | ||
Vite | ||
</a> | ||
. | ||
</Sidebar.GuideDescription> | ||
<ProjectCodes | ||
files={FILE_INFO} | ||
activeFile="/app/page.tsx" | ||
ignoreFiles={[...COMMON_IGNORE_FILES, '.env', 'vite.config.js', '/src/vite-env.d.ts']} | ||
/> | ||
</Sidebar.TabsPanel> | ||
<Sidebar.Bottom codeURL={EXAMPLE_CODE_URL + exampleKey} /> | ||
</Sidebar.Tabs> | ||
</Sidebar> | ||
<BasicExampleView | ||
rpcAddr={process.env.NEXT_PUBLIC_API_ADDR || ''} | ||
apiKey={process.env.NEXT_PUBLIC_EXAMPLES_API_KEY || ''} | ||
documentKey={exampleKey} | ||
iframeURL={EXAMPLE_PREVIEW_URL + exampleKey} | ||
/> | ||
</> | ||
)} | ||
</ExampleLayout> | ||
); | ||
}; | ||
export default CalendarExampleView; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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