================================================================ Repopack Output File ================================================================ This file was generated by Repopack on: 2024-08-19T13:56:35.510Z Purpose: -------- This file contains a packed representation of the entire repository's contents. It is designed to be easily consumable by AI systems for analysis, code review, or other automated processes. File Format: ------------ The content is organized as follows: 1. This header section 2. Repository structure 3. Multiple file entries, each consisting of: a. A separator line (================) b. The file path (File: path/to/file) c. Another separator line d. The full contents of the file e. A blank line Usage Guidelines: ----------------- 1. This file should be treated as read-only. Any changes should be made to the original repository files, not this packed version. 2. When processing this file, use the separators and "File:" markers to distinguish between different files in the repository. 3. Be aware that this file may contain sensitive information. Handle it with the same level of security as you would the original repository. Notes: ------ - Some files may have been excluded based on .gitignore rules and Repopack's configuration. - Binary files are not included in this packed representation. Please refer to the Repository Structure section for a complete list of file paths, including binary files. For more information about Repopack, visit: https://github.com/yamadashy/repopack ================================================================ Repository Structure ================================================================ components/ ActionForm.tsx AuthButton.tsx CampaignActionFields.tsx ContextWrapper.tsx Dashboard.tsx DashboardSKeleton.tsx layout.tsx ManageSubscriberActionFields.tsx MinimalLayout.tsx ProtectedRoute.tsx Sidebar.tsx SonCreationForm.tsx SonDetailsForm.tsx SonList.tsx SonListSkeleton.tsx TransactionalEmailActionFields.tsx WebhookInfo.tsx contexts/ AuthContext.tsx ListContext.tsx SonContext.tsx TemplateContext.tsx hooks/ useCustomToast.ts useInitialData.ts useLists.ts useSon.ts useSons.ts useTemplates.ts useWebhook.ts lib/ api-client.ts schemas.ts types.ts utils.ts pages/ auth/ verify.tsx sons/ [id].tsx index.tsx new.tsx _app.tsx _document.tsx index.tsx login.tsx settings.tsx public/ fonts/ inter-var-latin.woff2 favicon.ico next.svg vercel.svg styles/ globals.css types/ next-auth.d.ts .eslintrc.json .gitignore components.json next.config.mjs package.json postcss.config.mjs README.md tailwind.config.ts tsconfig.json ================================================================ Repository Files ================================================================ ================ File: components/ActionForm.tsx ================ import React from "react"; import { UseFormReturn } from "react-hook-form"; import { FormField, FormItem, FormLabel, FormControl, FormMessage, FormDescription, } from "@/components/ui/form"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Trash2 } from "lucide-react"; import { CampaignActionFields } from "./CampaignActionFields"; import { ManageSubscriberActionFields } from "./ManageSubscriberActionFields"; import { TransactionalEmailActionFields } from "./TransactionalEmailActionFields"; import { ListmonkList, ListmonkTemplate } from "@/lib/types"; interface ActionFormProps { form: UseFormReturn; index: number; remove: (index: number) => void; lists: ListmonkList[]; templates: ListmonkTemplate[]; } export function ActionForm({ form, index, remove, lists, templates, }: ActionFormProps) { const actionType: string = form.watch(`actions.${index}.type`); const trigger: string = form.watch("trigger"); return ( Action {index + 1} ( Action Type {actionType === "manage_subscriber" && (

This action will automatically create the subscriber on listmonk if he doesn't exist already.

Subscribers will be automatically added or removed to lists with the same name as the newsletters on Ghost.
)}
)} /> {actionType === "create_campaign" && ( )} {actionType === "manage_subscriber" && trigger === "member_created" && ( )} {actionType === "send_transactional_email" && ( )}
); } ================ File: components/AuthButton.tsx ================ import { useAuthContext } from "@/contexts/AuthContext"; import { Button } from "@/components/ui/button"; import Link from "next/link"; import { LogIn, LogOut } from "lucide-react"; import { useRouter } from "next/router"; export const AuthButton = () => { const { user, logout } = useAuthContext(); const router = useRouter(); const handleLogout = async () => { await logout(); router.push("/login"); }; return ( <> {user ? ( ) : ( )} ); }; ================ File: components/CampaignActionFields.tsx ================ import React from "react"; import { FormField, FormItem, FormLabel, FormControl, FormMessage, FormDescription, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Switch } from "@/components/ui/switch"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import { X } from "lucide-react"; import { CampaignActionFieldsProps } from "@/lib/types"; export function CampaignActionFields({ form, index, lists, templates, }: CampaignActionFieldsProps) { return (
( Subject The subject line for your campaign email. )} /> ( Campaign Type Choose the type of campaign you want to create. )} /> ( Content Type Choose the content type for your campaign. )} /> ( Campaign Body