Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | 4x 4x 4x 4x 4x 4x 4x 4x 54x 54x 54x | import Button from "components/Button";
import {
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from "components/Dialog";
import StyledLink from "components/StyledLink";
import { Trans, useTranslation } from "i18n";
import { DASHBOARD } from "i18n/namespaces";
import Link from "next/link";
import React from "react";
import { howToCompleteProfileUrl, routeToEditProfile } from "routes";
export interface ProfileIncompleteDialogProps {
open: boolean;
onClose: () => void;
attempted_action: "create_event" | "send_message" | "send_request";
}
export default function ProfileIncompleteDialog({
open,
onClose,
attempted_action,
}: ProfileIncompleteDialogProps) {
const { t } = useTranslation([DASHBOARD]);
const action_text = t(
`dashboard:complete_profile_dialog.actions.${attempted_action}`,
);
return (
<Dialog
aria-labelledby="profile-incomplete-dialog-title"
open={open}
onClose={onClose}
>
<DialogTitle id="profile-incomplete-dialog-title">
{t("dashboard:complete_profile_dialog.title")}
</DialogTitle>
<DialogContent>
<DialogContentText>
<Trans i18nKey="dashboard:complete_profile_dialog.description_1">
Before you can {{ action_name: action_text }}, you must{" "}
<strong>write a bit about yourself</strong> in your profile and{" "}
<strong>upload a profile photo</strong>.
</Trans>
</DialogContentText>
<DialogContentText>
<Trans i18nKey="dashboard:complete_profile_dialog.description_2">
This helps build a trusted community and reduce spam. For more
information,{" "}
<StyledLink href={howToCompleteProfileUrl}>
please refer to this help page
</StyledLink>
. Thank you for your help!
</Trans>
</DialogContentText>
</DialogContent>
<DialogActions>
<Button component={Link} href={routeToEditProfile()}>
{t("dashboard:complete_profile_dialog.edit_profile_button")}
</Button>
<Button onClick={onClose}>
{t("dashboard:complete_profile_dialog.cancel_button")}
</Button>
</DialogActions>
</Dialog>
);
}
|