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/lib/zod/schemas/program-lander.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const programLanderFileSchema = z.object({
.refine((url) => url.startsWith("http://") || url.startsWith("https://"), {
message: "Only HTTP and HTTPS URLs are allowed for files.",
}),
external: z.boolean().optional(),
external: z.boolean().optional(), // TODO: not using this atm, might wanna change this to `downloadable` boolean instead
});

export const programLanderFilesBlockSchema =
Expand Down
3 changes: 2 additions & 1 deletion apps/web/ui/partners/lander/blocks/files-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export function FilesBlock({
key={idx}
className="group flex items-center justify-between gap-4 rounded-lg border border-neutral-200 bg-white p-3 transition-colors duration-75 hover:bg-neutral-50 active:bg-neutral-100"
href={file.url}
{...(file.external ? { target: "_blank" } : { download: true })}
target="_blank"
rel="noopener noreferrer"
>
<div className="flex min-w-0 items-center gap-4">
<div className="shrink-0 rounded-full border border-neutral-200">
Expand Down
Loading