Fixed the home directory transations

This commit is contained in:
Vladyslav Matsiiako
2022-12-27 11:52:23 -05:00
parent 76da449463
commit cc251ba8ae
2 changed files with 9 additions and 1 deletions

View File

@@ -13,10 +13,12 @@ import {
faUserPlus
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useTranslation } from "next-i18next";
import onboardingCheck from '~/components/utilities/checks/OnboardingCheck';
import registerUserAction from '../api/userActions/registerUserAction';
import { getTranslatedServerSideProps } from '~/components/utilities/withTranslateProps';
type ItemProps = {
text: string;
@@ -37,6 +39,8 @@ const learningItem = ({
userAction,
link
}: ItemProps): JSX.Element => {
const { t } = useTranslation();
if (link) {
return (
<Link href={link}>
@@ -139,6 +143,8 @@ export default function Home() {
const [hasUserPushedSecrets, setHasUserPushedSecrets] = useState(false);
const [usersInOrg, setUsersInOrg] = useState(false);
const { t } = useTranslation();
useEffect(() => {
onboardingCheck({
setHasUserClickedIntro,
@@ -226,3 +232,5 @@ export default function Home() {
}
Home.requireAuth = true;
export const getServerSideProps = getTranslatedServerSideProps(["home"]);

View File

@@ -92,7 +92,7 @@ export default function Login() {
>
<div className="bg-bunker w-full max-w-md mx-auto h-7/12 py-4 pt-8 px-6 rounded-xl drop-shadow-xl">
<p className="text-3xl w-max mx-auto flex justify-center font-semibold text-bunker-100 mb-6">
{t("login:login-to")}
{t("login:login")}
</p>
<div className="flex items-center justify-center w-full md:p-2 rounded-lg mt-4 md:mt-0 max-h-24 md:max-h-28">
<InputField