Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/app/[locale]/admin/categories/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default async function CategoriesPage() {
<li>
Set environment variable:{" "}
<code className="rounded bg-gray-200 px-2 py-1">
$env:STRAPI_API_TOKEN="your-token"
$env:STRAPI_API_TOKEN=&quot;your-token&quot;
</code>
</li>
<li>
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/app/[locale]/campaigns/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export default function CreateCampaignPage() {
<CardHeader>
<CardTitle>Campaign Details</CardTitle>
<CardDescription>
Tell us about your project and what you're trying to achieve
Tell us about your project and what you&apos;re trying to
achieve
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,10 @@ export function ProjectDetailContent({ project }: ProjectDetailContentProps) {
<CardContent>
<p className="text-gray-700">
As with any innovative project, we face certain challenges.
We've identified potential risks and have contingency plans in
place. Our experienced team and thorough planning help mitigate
these risks, but we believe in transparency with our backers.
We&apos;ve identified potential risks and have contingency plans
in place. Our experienced team and thorough planning help
mitigate these risks, but we believe in transparency with our
backers.
</p>
</CardContent>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export function ProjectDetailHero({ project }: ProjectDetailHeroProps) {
className="h-full w-full object-cover"
poster={currentMedia.alternativeText}
>
<track kind="captions" />
Your browser does not support the video tag.
</video>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export function ProjectDetailHero({ project }: ProjectDetailHeroProps) {
className="h-full w-full object-cover"
poster={currentMedia.alternativeText}
>
<track kind="captions" />
Your browser does not support the video tag.
</video>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ export default function CreateProjectForm() {
<CardHeader>
<CardTitle>Project Details</CardTitle>
<CardDescription>
Tell us about your project and what you're trying to achieve
Tell us about your project and what you&apos;re trying to
achieve
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/[locale]/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AppLocale } from "@/types/general"

import { fetchProjects as strapiApiFetchProjects } from "@/lib/strapi-api/content/project"
import { Container } from "@/components/catalyst/container"
import FiltersSheet from "@/components/crowdfunding/FiltersSheet"
import FiltersSidebar from "@/components/crowdfunding/FiltersSidebar"
import ProjectCard from "@/components/crowdfunding/ProjectCard"
import ProjectsTopControls from "@/components/crowdfunding/ProjectsTopControls"
import { fetchProjects as strapiApiFetchProjects } from "@/lib/strapi-api/content/project"

interface ProjectsPageProps {
params: Promise<{ locale: AppLocale }>
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/app/api/comments/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { NextRequest, NextResponse } from "next/server"

import { env } from "@/env.mjs"

const STRAPI_URL = process.env.STRAPI_URL || "http://localhost:1338"
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/app/api/project-updates/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { NextRequest, NextResponse } from "next/server"

import { env } from "@/env.mjs"

const STRAPI_URL = process.env.STRAPI_URL || "http://localhost:1338"
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/catalyst/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function Footer() {
<h3 className="text-sm/6 font-semibold text-gray-900">
Solutions
</h3>
<ul role="list" className="mt-6 space-y-4">
<ul className="mt-6 space-y-4">
{navigation.solutions.map((item) => (
<li key={item.name}>
<a
Expand All @@ -141,7 +141,7 @@ export default function Footer() {
<h3 className="text-sm/6 font-semibold text-gray-900">
Support
</h3>
<ul role="list" className="mt-6 space-y-4">
<ul className="mt-6 space-y-4">
{navigation.support.map((item) => (
<li key={item.name}>
<a
Expand All @@ -160,7 +160,7 @@ export default function Footer() {
<h3 className="text-sm/6 font-semibold text-gray-900">
Company
</h3>
<ul role="list" className="mt-6 space-y-4">
<ul className="mt-6 space-y-4">
{navigation.company.map((item) => (
<li key={item.name}>
<a
Expand All @@ -175,7 +175,7 @@ export default function Footer() {
</div>
<div className="mt-10 md:mt-0">
<h3 className="text-sm/6 font-semibold text-gray-900">Legal</h3>
<ul role="list" className="mt-6 space-y-4">
<ul className="mt-6 space-y-4">
{navigation.legal.map((item) => (
<li key={item.name}>
<a
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/crowdfunding/AnalyticsDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
Users,
} from "lucide-react"
import {
Area,
AreaChart,
Area as AreaSeries,
Bar,
BarChart,
CartesianGrid,
Expand Down Expand Up @@ -447,7 +447,7 @@ export function AnalyticsDashboard({
<XAxis dataKey="hour" />
<YAxis />
<Tooltip />
<Area
<AreaSeries
type="monotone"
dataKey="amount"
stroke="#3b82f6"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/crowdfunding/DonationHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export default function DonationHistory({
</p>
{donation.message && (
<p className="text-muted-foreground text-sm italic">
"{donation.message}"
&ldquo;{donation.message}&rdquo;
</p>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/crowdfunding/DonationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default function DonationsList({
<div className="mt-2 flex items-start space-x-2">
<MessageSquare className="text-muted-foreground mt-0.5 h-4 w-4" />
<p className="text-muted-foreground text-sm italic">
"{donation.attributes.Message}"
&ldquo;{donation.attributes.Message}&rdquo;
</p>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/crowdfunding/ProjectFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export function ProjectFilters({
)}
{currentSearch && (
<Badge variant="secondary" className="text-xs">
"{currentSearch}"
&ldquo;{currentSearch}&rdquo;
<button
onClick={() => updateFilters("search", null)}
className="ml-1 hover:text-red-600"
Expand Down
6 changes: 4 additions & 2 deletions apps/web/src/components/crowdfunding/ProjectStatistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface TopBacker {
date: string
}

interface ProjectStatistics {
interface ProjectStatisticsData {
projectId: number
statistics: {
totalRaised: number
Expand Down Expand Up @@ -73,7 +73,9 @@ export function ProjectStatistics({
currency = "USD",
refreshInterval = 60,
}: ProjectStatisticsProps) {
const [statistics, setStatistics] = useState<ProjectStatistics | null>(null)
const [statistics, setStatistics] = useState<ProjectStatisticsData | null>(
null
)
const [loading, setLoading] = useState(true)
const [error, setError] = useState<string | null>(null)

Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/components/crowdfunding/ProjectUpdates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ export default function ProjectUpdates({
No updates yet
</h3>
<p className="text-gray-600">
The project creator hasn't posted any updates yet. Check back later!
The project creator hasn&apos;t posted any updates yet. Check back
later!
</p>
</CardContent>
</Card>
Expand Down
9 changes: 9 additions & 0 deletions apps/web/src/components/elementary/YouTubePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ export function YouTubePlayer({
return (
<div
className={`group relative aspect-video cursor-pointer overflow-hidden rounded-lg bg-gray-100 ${className}`}
role="button"
tabIndex={0}
aria-label={`Play ${title}`}
onClick={handlePlay}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault()
handlePlay()
}
}}
>
<img
src={getYouTubeThumbnail(videoId, "high")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export default function FeaturedProjects({ data }: FeaturesSectionProps) {
Smart Project Analytics
</h3>
<p className="mb-6 max-w-lg text-gray-600">
Track your project's performance with real-time analytics and
insights that help you make data-driven decisions.
Track your project&apos;s performance with real-time analytics
and insights that help you make data-driven decisions.
</p>
</div>

Expand Down
27 changes: 2 additions & 25 deletions apps/web/src/lib/email/donation-receipt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { render } from "@react-email/render"
import nodemailer from "nodemailer"

import { createTransporter } from "./send-email"

// Email template component
interface DonationReceiptProps {
Expand Down Expand Up @@ -99,30 +100,6 @@ const DonationReceiptEmail = ({
`
}

// Email transporter configuration
const createTransporter = () => {
// For development, use Ethereal Email or local SMTP
if (process.env.NODE_ENV === "development") {
return nodemailer.createTransport({
host: "localhost",
port: 1025, // MailHog or similar
secure: false,
ignoreTLS: true,
})
}

// For production, use real SMTP service
return nodemailer.createTransporter({
host: process.env.SMTP_HOST,
port: parseInt(process.env.SMTP_PORT || "587"),
secure: process.env.SMTP_SECURE === "true",
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASS,
},
})
}

// Send donation receipt
export async function sendDonationReceipt(
email: string,
Expand Down
37 changes: 37 additions & 0 deletions apps/web/src/lib/email/send-email.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import nodemailer from "nodemailer"

// Email transporter configuration
export const createTransporter = () => {
// For development, use Ethereal Email or local SMTP
if (process.env.NODE_ENV === "development") {
return nodemailer.createTransport({
host: "localhost",
port: 1025, // MailHog or similar
secure: false,
ignoreTLS: true,
})
}

// For production, use real SMTP service
return nodemailer.createTransport({
host: process.env.SMTP_HOST,
port: parseInt(process.env.SMTP_PORT || "587"),
secure: process.env.SMTP_SECURE === "true",
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASS,
},
})
}

export async function sendEmail(options: {
to: string
subject: string
html: string
text?: string
}) {
return createTransporter().sendMail({
from: process.env.SMTP_FROM || "Give Platform <noreply@give.local>",
...options,
})
}
3 changes: 2 additions & 1 deletion apps/web/src/lib/strapi-api/content/category.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PrivateStrapiClient } from "../strapi-client"
import { PrivateStrapiClient } from "@/lib/strapi-api"

import { StrapiResponse } from "../types"

export interface Category {
Expand Down
9 changes: 6 additions & 3 deletions apps/web/src/lib/strapi-api/content/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,12 @@ export async function fetchProjects({

// Filters
if (filters.type) queryParams["filters[Type][$eq]"] = filters.type
if (filters.category) queryParams["filters[Category][$eq]"] = filters.category
if (filters.projectStatus) queryParams["filters[ProjectStatus][$eq]"] = filters.projectStatus
if (filters.featured !== undefined) queryParams["filters[Featured][$eq]"] = filters.featured
if (filters.category)
queryParams["filters[Category][$eq]"] = filters.category
if (filters.projectStatus)
queryParams["filters[ProjectStatus][$eq]"] = filters.projectStatus
if (filters.featured !== undefined)
queryParams["filters[Featured][$eq]"] = filters.featured
if (filters.locale) queryParams["locale"] = filters.locale

// Sort
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@
"yarn": "1.22.x"
},
"comments": {
"prettier": "bump to 3.3.3 destroys types schemas generated by Strapi (@strapi/typescript-utils > generators > utils > prettier.format())"
"prettier": "bump to 3.3.3 destroys types schemas generated by Strapi (@strapi/typescript-utils > generators > utils > prettier.format())",
"eslint-plugin-react-hooks": "@vercel/style-guide 6 pins ^4.6.0, which calls context.getSource() removed in ESLint 9 and crashes next lint",
"sharp": "single sharp version: with 0.33.5 (@strapi/upload) and 0.34.x (next) both installed, yarn 1 hoists mismatched @img/sharp-* and @img/sharp-libvips-* packages and sharp fails to load libvips on Linux CI"
},
"resolutions": {
"eslint-plugin-react-hooks": "^5.2.0",
"sharp": "0.34.2"
},
"dependencies": {
"strapi-provider-email-brevo": "file:packages/strapi-provider-email-brevo"
Expand Down
Loading
Loading