import { Internship } from "@/data";
import React from "react";
import { Typography } from "@material-ui/core";
import { useTranslation } from "react-i18next";
import classNames from "classnames";
import { useVerticalSpacing } from "@/styles";
import moment from "moment";
import { Label, Section } from "@/components/section";
import { StudentPreview } from "@/pages/user/profile";
export type ProposalPreviewProps = {
proposal: Internship;
}
export const ProposalPreview = ({ proposal }: ProposalPreviewProps) => {
const { t } = useTranslation();
const classes = useVerticalSpacing(3);
const duration = moment.duration(proposal.endDate.diff(proposal.startDate));
return
{ proposal.company.name }
NIP: { proposal.company.nip }
{ t('internship.address.city', proposal.office.address) }
{ t('internship.address.street', proposal.office.address) }
{ proposal.type.label.pl }
{ t('internship.date-range', { start: proposal.startDate, end: proposal.endDate }) }
{ t('internship.duration', { duration, count: Math.floor(duration.asWeeks()) }) }
{ ", " }
{ t('internship.hours', { hours: proposal.hours, count: proposal.hours }) }
{ proposal.mentor.name } { proposal.mentor.surname }
{ proposal.mentor.email }, { proposal.mentor.phone }
}