Skip to content

Commit

Permalink
change text of sign in account
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodriguespn committed Feb 20, 2024
1 parent 5bc5f31 commit f77ae16
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PublicApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const PublicApp: FC = () => {
</UnauthenticatedTimeContext.Provider>
{/* The AuthDialog is shown when the user is not authenticated and the time limit is reached
No setter is passed to the AuthDialog because the user can only close it by logging in or creating an account */}
<AuthDialog isOpen={showAuthDialog} setIsOpen={() => { }} />
<AuthDialog isOpen={showAuthDialog} setIsOpen={() => { }} signInText="Sign in to your account to continue using the app" />
</BrowserRouter>
);
};
Expand Down
10 changes: 8 additions & 2 deletions src/components/auth/AuthDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ interface AuthDialogProps {
isOpen: boolean;
setIsOpen: (isOpen: boolean) => void;
redirectUrl?: RedirectUrl;
signInText?: string;
}

const AuthDialog: FC<AuthDialogProps> = ({ isOpen, setIsOpen, redirectUrl = { pathname: "graph" } }) => {
const AuthDialog: FC<AuthDialogProps> = ({
isOpen,
setIsOpen,
redirectUrl = { pathname: "graph" },
signInText = "Sign in to your account"
}) => {
const navigate = useNavigate();

const [authDialogState, setAuthDialogState] = useState(AuthDialogState.LOGIN);
Expand Down Expand Up @@ -269,7 +275,7 @@ const AuthDialog: FC<AuthDialogProps> = ({ isOpen, setIsOpen, redirectUrl = { pa
<div className="flex items-center justify-between border-b border-gray-200 pb-3">
<h3 className="flex flex-row items-center gap-x-1.5 text-lg font-semibold leading-6 text-gray-900">
{authDialogState === AuthDialogState.LOGIN ? (
<>Sign in to your account</>
<>{signInText}</>
) : authDialogState ===
AuthDialogState.FORGOT_PASSWORD ? (
<>Reset your password</>
Expand Down
1 change: 1 addition & 0 deletions src/templates/UnsavedGraphTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const UnsavedGraphTemplate: FC<UnsavedGraphTemplateProps> = ({
leaveTo="opacity-0 scale-50"
className="absolute flex h-full w-full flex-col items-center justify-center"
>
<LoginBanner />
<LandingPage
setSearchedAddress={(address: string) => {
setGraph({ addresses: [address], edges: [] });
Expand Down

0 comments on commit f77ae16

Please sign in to comment.