This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Convert DynamicLiveCodeSandPack export to default
- Loading branch information
Showing
21 changed files
with
223 additions
and
158 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
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,35 +1,34 @@ | ||
import dynamic from "next/dynamic"; | ||
import { MoveRight } from "lucide-react"; | ||
|
||
export const DynamicLiveCodeSandPack = dynamic( | ||
() => import("./LiveCodeSandpack"), | ||
{ | ||
loading: () => { | ||
const loadingWindow = ( | ||
<div className="mockup-window bg-gray-200 border dark:bg-gray-800 dark:border-gray-700"> | ||
<div className="w-full bg-gray-100 border dark:bg-gray-900"> | ||
<div className="h-96 flex items-center justify-center"> | ||
<span className="loading loading-spinner loading-md"></span>{" "} | ||
</div> | ||
<div className="h-3 bg-gray-100" /> | ||
<div className="h-96 flex items-center justify-center"> | ||
<span className="loading loading-spinner loading-md"></span>{" "} | ||
</div> | ||
const DynamicLiveCodeSandpack = dynamic(() => import("./LiveCodeSandpack"), { | ||
loading: () => { | ||
const loadingWindow = ( | ||
<div className="mockup-window bg-gray-200 border dark:bg-gray-800 dark:border-gray-700"> | ||
<div className="w-full bg-gray-100 border dark:bg-gray-900"> | ||
<div className="h-96 flex items-center justify-center"> | ||
<span className="loading loading-spinner loading-md"></span>{" "} | ||
</div> | ||
<div className="h-3 bg-gray-100" /> | ||
<div className="h-96 flex items-center justify-center"> | ||
<span className="loading loading-spinner loading-md"></span>{" "} | ||
</div> | ||
</div> | ||
); | ||
|
||
return ( | ||
<div className="grid xl:grid-rows-1 xl:grid-cols-beforeAfterCodingBlocks grid-cols-1 grid-row-2 gap-4 w-full mt-6"> | ||
{loadingWindow} | ||
</div> | ||
); | ||
|
||
<div className="items-center hidden xl:flex"> | ||
<MoveRight className="dark:text-gray-100 text-gray-500" size={30} /> | ||
</div> | ||
return ( | ||
<div className="grid xl:grid-rows-1 xl:grid-cols-beforeAfterCodingBlocks grid-cols-1 grid-row-2 gap-4 w-full mt-6"> | ||
{loadingWindow} | ||
|
||
{loadingWindow} | ||
<div className="items-center hidden xl:flex"> | ||
<MoveRight className="dark:text-gray-100 text-gray-500" size={30} /> | ||
</div> | ||
); | ||
}, | ||
} | ||
); | ||
|
||
{loadingWindow} | ||
</div> | ||
); | ||
}, | ||
}); | ||
|
||
export { DynamicLiveCodeSandpack }; |
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
This file was deleted.
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,13 @@ | ||
import nextra from "nextra"; | ||
|
||
const withNextra = nextra({ | ||
theme: "nextra-theme-docs", | ||
themeConfig: "./theme.config.jsx", | ||
}); | ||
|
||
export default withNextra({ | ||
reactStrictMode: false, | ||
eslint: { | ||
ignoreDuringBuilds: true, | ||
}, | ||
}); |
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
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
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
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
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
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
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
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
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,24 +1,31 @@ | ||
{ | ||
"extends": "@react-unforget/typescript-config/nextjs.json", | ||
"compilerOptions": { | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"baseUrl": ".", | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"isolatedModules": true, | ||
"moduleResolution": "node", | ||
"jsx": "preserve", | ||
"module": "esnext", | ||
"resolveJsonModule": true, | ||
"paths": { | ||
"@components/*": ["./components/*"] | ||
"@components/*": ["components/*"] | ||
} | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
"next.config.js", | ||
"theme.config.jsx", | ||
"tailwind.config.js", | ||
"postcss.config.js", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
".next/types/**/*.ts" | ||
], | ||
"**/*.js", | ||
"**/*.jsx", | ||
"**/*.mdx" | ||
, "next.config.mjs" ], | ||
"exclude": ["node_modules"] | ||
} |
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,3 @@ | ||
{ | ||
"public": true | ||
} |
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
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
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
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
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.