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
+8
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"]);