mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-29 18:00:26 -06:00
Move repository into a monorepo with turborepo and pnpm. This is a big change in the way the code is organized, used and deployed.
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import { DocumentMagnifyingGlassIcon, CommandLineIcon } from "@heroicons/react/24/outline";
|
|
import { useRouter } from "next/router";
|
|
import { FaReact } from "react-icons/fa";
|
|
|
|
export const useCodeSecondNavigation = (formId) => {
|
|
const router = useRouter();
|
|
return [
|
|
{
|
|
id: "formId",
|
|
onClick: () => {
|
|
router.push(`/forms/${formId}/form`);
|
|
},
|
|
Icon: CommandLineIcon,
|
|
label: "Form ID",
|
|
},
|
|
{
|
|
id: "react",
|
|
onClick: () => {
|
|
router.push(`/forms/${formId}/form/react`);
|
|
},
|
|
Icon: FaReact,
|
|
label: "React",
|
|
},
|
|
{
|
|
id: "reactNative",
|
|
onClick: () => {},
|
|
Icon: FaReact,
|
|
label: "React Native",
|
|
disabled: true,
|
|
},
|
|
{
|
|
id: "vueJs",
|
|
onClick: () => {},
|
|
Icon: CommandLineIcon,
|
|
label: "VueJs",
|
|
disabled: true,
|
|
},
|
|
{
|
|
id: "docs",
|
|
onClick: () => {
|
|
window.open("https://docs.snoopforms.com", "_ blank");
|
|
},
|
|
Icon: DocumentMagnifyingGlassIcon,
|
|
label: "Docs",
|
|
},
|
|
];
|
|
};
|