Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Commit

Permalink
csv download and fetch form response
Browse files Browse the repository at this point in the history
  • Loading branch information
Manas2403 committed Jul 7, 2023
1 parent 1184bce commit e7e8278
Show file tree
Hide file tree
Showing 4 changed files with 429 additions and 360 deletions.
48 changes: 24 additions & 24 deletions components/elements/FormResponse/index.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import React from 'react';
import React from "react";
import moment from "moment";

export default function FormResponse({ response }) {
return (
<>
<div className="border-2 rounded-lg">
<div className="p-4 flex flex-col">
<div className="flex flex-row gap-1">
<div className="text-[#001e2b] font-semibold text-sm">Name:</div>
<div className="text-[#006bfb] font-base text-sm">Manas Gupta</div>
</div>
<div className="flex flex-row gap-1">
<div className="text-[#001e2b] font-semibold text-sm">City:</div>
<div className="text-[#006bfb] font-base text-sm">Ludhiana</div>
</div>
<div className="flex flex-row gap-1">
<div className="text-[#001e2b] font-semibold text-sm">State:</div>
<div className="text-[#006bfb] font-base text-sm">Punjab</div>
</div>
<div className="self-end text-[#001e2b] italic text-xs">
Submittted a week ago
</div>
</div>
</div>
</>
);
return (
<>
<div className="border-2 rounded-lg">
<div className="p-4 flex flex-col">
{Object.entries(response.data).map((el) => (
<div className="flex flex-row gap-1">
<div className="text-[#001e2b] font-semibold text-sm">
{el[0]}:
</div>
<div className="text-[#006bfb] font-base text-sm">
{el[1]}
</div>
</div>
))}
<div className="self-end text-[#001e2b] italic text-xs">
{moment(response.createdAt).fromNow()}
</div>
</div>
</div>
</>
);
}
Loading

1 comment on commit e7e8278

@vercel
Copy link

@vercel vercel bot commented on e7e8278 Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.