mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 17:35:00 -05:00
fix: didn't compile
This commit is contained in:
parent
60e0c5863a
commit
e883484e66
@ -8,6 +8,8 @@ When running Inngest, on Vercel's servers, when doing the `/servers` Minehut API
|
||||
|
||||
## How do you run this?
|
||||
|
||||
|
||||
|
||||
If you're on a Unix based machine, just type the following:
|
||||
|
||||
```bash
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.24.7",
|
||||
"@clerk/nextjs": "^5.1.3",
|
||||
"@emotion/is-prop-valid": "^1.3.0",
|
||||
"@monaco-editor/react": "^4.6.0",
|
||||
"@radix-ui/react-hover-card": "^1.1.1",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
|
||||
@ -8,64 +8,61 @@ import { useRouter } from "@/lib/useRouter";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
|
||||
export function Sidebar() {
|
||||
return (
|
||||
<>
|
||||
{allFolders.map((docs) => (
|
||||
<Folder docs={docs} key={"url" in docs ? docs.title : docs.name} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Folder({ docs }: { docs: any }) {
|
||||
const [folderOpen, setOpen] = useState(false);
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
|
||||
return (
|
||||
<>
|
||||
{allFolders.map((docs) => {
|
||||
const [folderOpen, setOpen] = useState(false);
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-full font-normal tracking-normal mt-1"
|
||||
noJustify
|
||||
variant={
|
||||
"url" in docs
|
||||
? pathname == docs.url
|
||||
? "default"
|
||||
: "ghost"
|
||||
: "ghost"
|
||||
}
|
||||
onClick={() => {
|
||||
if ("docs" in docs) {
|
||||
setOpen(!folderOpen);
|
||||
} else {
|
||||
router.push(docs.url);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{"url" in docs ? docs.title : docs.name}
|
||||
<div className="flex items-center ml-auto text-muted-foreground">
|
||||
<AnimatePresence>
|
||||
{"docs" in docs && folderOpen && (
|
||||
<motion.div
|
||||
initial={{ rotate: 90 }}
|
||||
animate={{ rotate: 0 }}
|
||||
>
|
||||
<ChevronRight size={18} />
|
||||
</motion.div>
|
||||
)}
|
||||
{"docs" in docs && !folderOpen && (
|
||||
<motion.div
|
||||
initial={{ rotate: 0 }}
|
||||
animate={{ rotate: 90 }}
|
||||
>
|
||||
<ChevronRight size={18} />
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</Button>
|
||||
<div className="ml-2">
|
||||
{folderOpen && <Subdocs docs={"docs" in docs ? docs.docs : []} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
<div key={"url" in docs ? docs.title : docs.name}>
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-full font-normal tracking-normal mt-1"
|
||||
noJustify
|
||||
variant={
|
||||
"url" in docs
|
||||
? pathname === docs.url
|
||||
? "default"
|
||||
: "ghost"
|
||||
: "ghost"
|
||||
}
|
||||
onClick={() => {
|
||||
if ("docs" in docs) {
|
||||
setOpen(!folderOpen);
|
||||
} else {
|
||||
router.push(docs.url);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{"url" in docs ? docs.title : docs.name}
|
||||
<div className="flex items-center ml-auto text-muted-foreground">
|
||||
<AnimatePresence>
|
||||
{"docs" in docs && folderOpen && (
|
||||
<motion.div initial={{ rotate: 90 }} animate={{ rotate: 0 }}>
|
||||
<ChevronRight size={18} />
|
||||
</motion.div>
|
||||
)}
|
||||
{"docs" in docs && !folderOpen && (
|
||||
<motion.div initial={{ rotate: 0 }} animate={{ rotate: 90 }}>
|
||||
<ChevronRight size={18} />
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</Button>
|
||||
<div className="ml-2">
|
||||
{folderOpen && <Subdocs docs={"docs" in docs ? docs.docs : []} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -77,30 +74,30 @@ function Subdocs({ docs }: { docs: (Docs | DocsFolder)[] }) {
|
||||
{docs.map((doc) => {
|
||||
if ("docs" in doc) {
|
||||
return <Subdocs docs={doc.docs} />;
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-full font-normal tracking-normal mt-1"
|
||||
noJustify
|
||||
onClick={() => {
|
||||
router.push(doc.url);
|
||||
}}
|
||||
variant={
|
||||
"url" in doc
|
||||
? pathname == doc.url
|
||||
? "default"
|
||||
: "ghost"
|
||||
: "ghost"
|
||||
}
|
||||
>
|
||||
{doc.title}
|
||||
</Button>
|
||||
<br />
|
||||
</>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-full font-normal tracking-normal mt-1"
|
||||
noJustify
|
||||
onClick={() => {
|
||||
router.push(doc.url);
|
||||
}}
|
||||
key={doc.title}
|
||||
variant={
|
||||
"url" in doc
|
||||
? pathname == doc.url
|
||||
? "default"
|
||||
: "ghost"
|
||||
: "ghost"
|
||||
}
|
||||
>
|
||||
{doc.title}
|
||||
</Button>
|
||||
<br key={doc.url} />
|
||||
</>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
);
|
||||
|
||||
@ -1,33 +1,34 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"contentlayer/generated": ["./.contentlayer/generated"],
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
".contentlayer/generated"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"contentlayer/generated": ["./.contentlayer/generated"],
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
".contentlayer/generated",
|
||||
"docs/legal/external-content-agreement.mdx"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
12
yarn.lock
12
yarn.lock
@ -399,6 +399,18 @@
|
||||
resolved "https://registry.yarnpkg.com/@effect-ts/system/-/system-0.57.5.tgz#921e9b39dcea2d1728e0f49a0af233472efdc6cb"
|
||||
integrity sha512-/crHGujo0xnuHIYNc1VgP0HGJGFSoSqq88JFXe6FmFyXPpWt8Xu39LyLg7rchsxfXFeEdA9CrIZvLV5eswXV5g==
|
||||
|
||||
"@emotion/is-prop-valid@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.3.0.tgz#bd84ba972195e8a2d42462387581560ef780e4e2"
|
||||
integrity sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ==
|
||||
dependencies:
|
||||
"@emotion/memoize" "^0.9.0"
|
||||
|
||||
"@emotion/memoize@^0.9.0":
|
||||
version "0.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.9.0.tgz#745969d649977776b43fc7648c556aaa462b4102"
|
||||
integrity sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==
|
||||
|
||||
"@esbuild-plugins/node-resolve@^0.1.4":
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild-plugins/node-resolve/-/node-resolve-0.1.4.tgz#2257ef3b233c9cb3acd2ebde7d5a3d6874046d38"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user