-
Filter by Skill
+
Filter by Skill
{allTags.map((tag: string) => (
-
+
{filteredGuides.map((guide) => (
-
+
{guide.title}
@@ -100,5 +113,5 @@ export default function Guides() {
))}
- )
+ );
}
diff --git a/apps/nextjs/src/app/(home)/action-guides/_components/GuideCardNonLegacy.tsx b/apps/nextjs/src/app/(home)/action-guides/_components/GuideCardNonLegacy.tsx
deleted file mode 100644
index 92c2546..0000000
--- a/apps/nextjs/src/app/(home)/action-guides/_components/GuideCardNonLegacy.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-//@ts-nocheck
-"use client"
-
-import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@amaxa/ui/card"
-import { Input } from "@amaxa/ui/input"
-import { Badge } from "lucide-react"
-import { useState, useMemo } from "react"
-
-
-export const TagToggle = ({
- tag,
- handleTagClick,
-}: {
- tag: string
- handleTagClick: (tag: string) => void
-}) => {
- return (
-
handleTagClick(tag)}
- className="cursor-pointer"
- >
- {tag}
-
- )
-
-}
-
-export default function Component() {
-
- return (
-
-
Action Guides
-
-
-
-
-
Filter by Skill
-
- {/* Tags */}
-
-
-
- {guides.map((guide) => (
- ))}
-
-
- )
-}
-
-export const GuideCard = () => {
- return (
-
-
- {guide.title}
-
-
- {guide.description}
-
-
-
- {guide.tags.map((tag) => (
-
- {tag}
-
- ))}
-
-
-
- )
-}
diff --git a/apps/nextjs/src/app/(home)/action-guides/com.tsx b/apps/nextjs/src/app/(home)/action-guides/com.tsx
index 47cdfcc..32b9a27 100644
--- a/apps/nextjs/src/app/(home)/action-guides/com.tsx
+++ b/apps/nextjs/src/app/(home)/action-guides/com.tsx
@@ -1,20 +1,18 @@
-import React from 'react'
+import React from "react";
+
import "react-notion/src/styles.css";
-import type { BlockMapType} from 'react-notion';
-import { NotionRenderer } from 'react-notion'
-export const Com = async (props: {
- id: string
-}) => {
- const data = await fetch(
- `https://notion-api.splitbee.io/v1/page/${props.id}`
- ).then(res => res.json()) as BlockMapType
+import type { BlockMapType } from "react-notion";
+import { NotionRenderer } from "react-notion";
+
+export const Com = async (props: { id: string }) => {
+ const data = (await fetch(
+ `https://notion-api.splitbee.io/v1/page/${props.id}`,
+ ).then((res) => res.json())) as BlockMapType;
return (
-
+
- )
-}
+ );
+};
diff --git a/apps/nextjs/src/app/(home)/action-guides/filters/PickerForm.tsx b/apps/nextjs/src/app/(home)/action-guides/filters/PickerForm.tsx
deleted file mode 100644
index 5170a9c..0000000
--- a/apps/nextjs/src/app/(home)/action-guides/filters/PickerForm.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-"use client";
-import { Button } from "@/components/ui/button";
-import {
- Command,
- CommandEmpty,
- CommandGroup,
- CommandInput,
- CommandItem,
-} from "@/components/ui/command";
-import {
- Popover,
- PopoverContent,
- PopoverTrigger,
-} from "@/components/ui/popover";
-import { cn } from "@/lib/utils";
-import { CaretSortIcon } from "@radix-ui/react-icons";
-import { CheckIcon } from "lucide-react";
-import { usePathname, useRouter, useSearchParams } from "next/navigation";
-import React from "react";
-
-interface CourseData {
- value: number;
- label: string;
-}
-
-export function PickerForm(props: { data: CourseData[], idx: string }) {
- const [open, setOpen] = React.useState(false);
- const router = useRouter();
- const pathname = usePathname();
- const searchParams = useSearchParams();
- const { data, idx } = props;
- const [value, setValue] = React.useState(searchParams.get(idx) ?? "");
-
- function handleChange(value: string) {
- if (value == "" || value == " " || value == null || value === "clear") {
- return router.push(pathname);
- }
- setValue(value);
- router.push(`${pathname}/?${idx}=${value}`);
- }
-
- return (
-
-
-
-
-
-
-
- No Course found.
-
- {data.map((framework) => (
- {
- handleChange(currentValue === value ? "" : currentValue);
- setOpen(false);
- }}
- >
- {framework.label ?? "Clear"}
-
-
- ))}
-
-
-
-
- );
-}
diff --git a/apps/nextjs/src/app/(home)/action-guides/filters/project.tsx b/apps/nextjs/src/app/(home)/action-guides/filters/project.tsx
deleted file mode 100644
index 163213c..0000000
--- a/apps/nextjs/src/app/(home)/action-guides/filters/project.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { api } from "@/trpc/server";
-import { PickerForm } from "./PickerForm";
-
-
-
-export const FilterProject = async () => {
- const data = await api.actionGuides.projectNames.query();
- const courseData = data.map((course) => ({
- value: course.id,
- label: course.name,
- }));
-
- return (
-
- );
-}
diff --git a/apps/nextjs/src/app/(home)/action-guides/filters/skill.tsx b/apps/nextjs/src/app/(home)/action-guides/filters/skill.tsx
deleted file mode 100644
index a62589d..0000000
--- a/apps/nextjs/src/app/(home)/action-guides/filters/skill.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from 'react'
-import { PickerForm } from './PickerForm';
-import { api } from '@/trpc/server';
-
-export const FilterSkill = async () => {
- const data = await api.actionGuides.skillNames.query();
- const courseData = data.map((course) => ({
- value: course.id,
- label: course.name,
- }));
-
- return (
-
- );
-
-}
diff --git a/apps/nextjs/src/app/(home)/action-guides/page.tsx b/apps/nextjs/src/app/(home)/action-guides/page.tsx
index e2f06ca..e7ff82f 100644
--- a/apps/nextjs/src/app/(home)/action-guides/page.tsx
+++ b/apps/nextjs/src/app/(home)/action-guides/page.tsx
@@ -1,12 +1,11 @@
+import React from "react";
-import React from 'react'
-import Guides from './_components/GuideCard'
+import Guides from "./_components/GuideCard";
export default function Page() {
return (
- )
+ );
}
-
diff --git a/apps/nextjs/src/app/(home)/events/_components/CreateEvent.tsx b/apps/nextjs/src/app/(home)/events/_components/CreateEvent.tsx
index 5e2d976..5dff99e 100644
--- a/apps/nextjs/src/app/(home)/events/_components/CreateEvent.tsx
+++ b/apps/nextjs/src/app/(home)/events/_components/CreateEvent.tsx
@@ -1,54 +1,73 @@
-"use client"
-import { Button } from '@amaxa/ui/button'
+"use client";
+
+import type { z } from "zod";
+import React from "react";
+import { useRouter } from "next/navigation";
+import { zodResolver } from "@hookform/resolvers/zod";
import { format } from "date-fns";
-import { zodResolver } from "@hookform/resolvers/zod"
-import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '@amaxa/ui/dialog'
-import { TimePickerDemo } from "@amaxa/ui/time-picker/time-picker-demo"
-import { Calendar } from "@amaxa/ui/calendar"
-import { useForm } from 'react-hook-form'
-import { Input } from '@amaxa/ui/input'
-import { Switch } from '@amaxa/ui/switch'
-import { toast } from '@amaxa/ui/toast'
-import { useRouter } from 'next/navigation'
-import React from 'react'
-import { showErrorToast } from '~/lib/handle-error'
-import { api } from '~/trpc/react'
-import { createEventSchema } from '@amaxa/db/schema'
-import type { z } from 'zod'
-import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@amaxa/ui/form'
-import { Textarea } from '@amaxa/ui/textarea'
-import { Popover, PopoverContent, PopoverTrigger } from '@amaxa/ui/popover'
-import { cn } from '@amaxa/ui'
-import { CalendarIcon } from 'lucide-react'
+import { CalendarIcon } from "lucide-react";
+import { useForm } from "react-hook-form";
+
+import { createEventSchema } from "@amaxa/db/schema";
+import { cn } from "@amaxa/ui";
+import { Button } from "@amaxa/ui/button";
+import { Calendar } from "@amaxa/ui/calendar";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@amaxa/ui/dialog";
+import {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@amaxa/ui/form";
+import { Input } from "@amaxa/ui/input";
+import { Popover, PopoverContent, PopoverTrigger } from "@amaxa/ui/popover";
+import { Switch } from "@amaxa/ui/switch";
+import { Textarea } from "@amaxa/ui/textarea";
+import { TimePickerDemo } from "@amaxa/ui/time-picker/time-picker-demo";
+import { toast } from "@amaxa/ui/toast";
+
+import { showErrorToast } from "~/lib/handle-error";
+import { api } from "~/trpc/react";
-type CreateEventProps = z.infer
+type CreateEventProps = z.infer;
export const CreateEvent = () => {
- const router = useRouter()
+ const router = useRouter();
const { mutate: create } = api.events.create.useMutation({
onSuccess: () => {
- toast.success('Event created')
- router.refresh()
+ toast.success("Event created");
+ router.refresh();
},
onError: (error) => {
- showErrorToast(error)
+ showErrorToast(error);
},
- })
+ });
const form = useForm({
- resolver: zodResolver(createEventSchema)
- })
+ resolver: zodResolver(createEventSchema),
+ });
function handleSubmit(data: CreateEventProps) {
- create(data)
+ create(data);
}
return (