mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 23:45:02 -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?
|
## How do you run this?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If you're on a Unix based machine, just type the following:
|
If you're on a Unix based machine, just type the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": "^7.24.7",
|
"@babel/parser": "^7.24.7",
|
||||||
"@clerk/nextjs": "^5.1.3",
|
"@clerk/nextjs": "^5.1.3",
|
||||||
|
"@emotion/is-prop-valid": "^1.3.0",
|
||||||
"@monaco-editor/react": "^4.6.0",
|
"@monaco-editor/react": "^4.6.0",
|
||||||
"@radix-ui/react-hover-card": "^1.1.1",
|
"@radix-ui/react-hover-card": "^1.1.1",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
|
|||||||
@ -8,64 +8,61 @@ import { useRouter } from "@/lib/useRouter";
|
|||||||
import { AnimatePresence, motion } from "framer-motion";
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
export function Sidebar() {
|
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();
|
const pathname = usePathname();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div key={"url" in docs ? docs.title : docs.name}>
|
||||||
{allFolders.map((docs) => {
|
<Button
|
||||||
const [folderOpen, setOpen] = useState(false);
|
size="sm"
|
||||||
const router = useRouter();
|
className="w-full font-normal tracking-normal mt-1"
|
||||||
|
noJustify
|
||||||
return (
|
variant={
|
||||||
<div>
|
"url" in docs
|
||||||
<Button
|
? pathname === docs.url
|
||||||
size="sm"
|
? "default"
|
||||||
className="w-full font-normal tracking-normal mt-1"
|
: "ghost"
|
||||||
noJustify
|
: "ghost"
|
||||||
variant={
|
}
|
||||||
"url" in docs
|
onClick={() => {
|
||||||
? pathname == docs.url
|
if ("docs" in docs) {
|
||||||
? "default"
|
setOpen(!folderOpen);
|
||||||
: "ghost"
|
} else {
|
||||||
: "ghost"
|
router.push(docs.url);
|
||||||
}
|
}
|
||||||
onClick={() => {
|
}}
|
||||||
if ("docs" in docs) {
|
>
|
||||||
setOpen(!folderOpen);
|
{"url" in docs ? docs.title : docs.name}
|
||||||
} else {
|
<div className="flex items-center ml-auto text-muted-foreground">
|
||||||
router.push(docs.url);
|
<AnimatePresence>
|
||||||
}
|
{"docs" in docs && folderOpen && (
|
||||||
}}
|
<motion.div initial={{ rotate: 90 }} animate={{ rotate: 0 }}>
|
||||||
>
|
<ChevronRight size={18} />
|
||||||
{"url" in docs ? docs.title : docs.name}
|
</motion.div>
|
||||||
<div className="flex items-center ml-auto text-muted-foreground">
|
)}
|
||||||
<AnimatePresence>
|
{"docs" in docs && !folderOpen && (
|
||||||
{"docs" in docs && folderOpen && (
|
<motion.div initial={{ rotate: 0 }} animate={{ rotate: 90 }}>
|
||||||
<motion.div
|
<ChevronRight size={18} />
|
||||||
initial={{ rotate: 90 }}
|
</motion.div>
|
||||||
animate={{ rotate: 0 }}
|
)}
|
||||||
>
|
</AnimatePresence>
|
||||||
<ChevronRight size={18} />
|
</div>
|
||||||
</motion.div>
|
</Button>
|
||||||
)}
|
<div className="ml-2">
|
||||||
{"docs" in docs && !folderOpen && (
|
{folderOpen && <Subdocs docs={"docs" in docs ? docs.docs : []} />}
|
||||||
<motion.div
|
</div>
|
||||||
initial={{ rotate: 0 }}
|
</div>
|
||||||
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) => {
|
{docs.map((doc) => {
|
||||||
if ("docs" in doc) {
|
if ("docs" in doc) {
|
||||||
return <Subdocs docs={doc.docs} />;
|
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": {
|
"compilerOptions": {
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "next"
|
"name": "next"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"contentlayer/generated": ["./.contentlayer/generated"],
|
"contentlayer/generated": ["./.contentlayer/generated"],
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"next-env.d.ts",
|
"next-env.d.ts",
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
"**/*.tsx",
|
"**/*.tsx",
|
||||||
".next/types/**/*.ts",
|
".next/types/**/*.ts",
|
||||||
".contentlayer/generated"
|
".contentlayer/generated",
|
||||||
],
|
"docs/legal/external-content-agreement.mdx"
|
||||||
"exclude": ["node_modules"]
|
],
|
||||||
|
"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"
|
resolved "https://registry.yarnpkg.com/@effect-ts/system/-/system-0.57.5.tgz#921e9b39dcea2d1728e0f49a0af233472efdc6cb"
|
||||||
integrity sha512-/crHGujo0xnuHIYNc1VgP0HGJGFSoSqq88JFXe6FmFyXPpWt8Xu39LyLg7rchsxfXFeEdA9CrIZvLV5eswXV5g==
|
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":
|
"@esbuild-plugins/node-resolve@^0.1.4":
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/@esbuild-plugins/node-resolve/-/node-resolve-0.1.4.tgz#2257ef3b233c9cb3acd2ebde7d5a3d6874046d38"
|
resolved "https://registry.yarnpkg.com/@esbuild-plugins/node-resolve/-/node-resolve-0.1.4.tgz#2257ef3b233c9cb3acd2ebde7d5a3d6874046d38"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user