This repository has been archived by the owner on Dec 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
csv download and fetch form response
- Loading branch information
Showing
4 changed files
with
429 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
</> | ||
); | ||
} |
Oops, something went wrong.
e7e8278
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
save-my-form-frontend – ./
save-my-form-frontend-git-main-savemyform.vercel.app
save-my-form-frontend-savemyform.vercel.app
save-my-form-frontend.vercel.app