added ImageCarousel component, added icons to action buttons, modified project route
This commit is contained in:
@@ -10,23 +10,22 @@ interface ProjectData {
|
||||
tech: string;
|
||||
wip?: boolean;
|
||||
created_at: string;
|
||||
images: Array<string>;
|
||||
}
|
||||
|
||||
export const handler: Handlers<ProjectData> = {
|
||||
export const handler: Handlers<Array<ProjectData>> = {
|
||||
async GET(_req: Request, ctx: FreshContext) {
|
||||
const projectResult = await fetch(
|
||||
`${Deno.env.get("BASE_URI_API")}/projects`,
|
||||
);
|
||||
|
||||
const projectData = await projectResult.json();
|
||||
return ctx.render({
|
||||
projectData,
|
||||
});
|
||||
return ctx.render(projectData);
|
||||
},
|
||||
};
|
||||
|
||||
export default function Projects({ data }: PageProps<ProjectData>) {
|
||||
const { projectData: projects } = data;
|
||||
export default function Projects(props: PageProps<Array<ProjectData>>) {
|
||||
const projects = props.data;
|
||||
|
||||
return (
|
||||
<div class="space-y-12 px-10 py-8 sm:min-h-screen bg-[#313244]">
|
||||
@@ -56,6 +55,7 @@ export default function Projects({ data }: PageProps<ProjectData>) {
|
||||
}
|
||||
tech={project.tech}
|
||||
wip={project.wip ?? true}
|
||||
images={project.images}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user