forked from ElricLiu/AutoGPT-Next-Web
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSignInDialog.tsx
More file actions
37 lines (34 loc) · 984 Bytes
/
SignInDialog.tsx
File metadata and controls
37 lines (34 loc) · 984 Bytes
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
import React from "react";
import Dialog from "./Dialog";
import Button from "./Button";
import { useAuth } from "../hooks/useAuth";
import { Trans, useTranslation } from "next-i18next";
export interface SignInDialogProps {
show: boolean;
close: () => void;
}
export const SignInDialog = ({ show, close }: SignInDialogProps) => {
const { signIn } = useAuth();
const { t } = useTranslation(['chat','common']);
return (
<Dialog
header={`${t('common:sign-in')} 🔐`}
isShown={show}
close={close}
footerButton={<Button onClick={() => void signIn()}>{t('common:sign-in')}</Button>}
>
<Trans i18nKey="signin-tips" ns="chat">
<p>
Please
<a className="link" onClick={() => void signIn()}>
sign in
</a>
to deploy an Agent! 🤖
</p>
<p>
You can also use Cody chat and deep seek coder v3 after signing in.
</p>
</Trans>
</Dialog>
);
};