Skip to content

Commit

Permalink
Merge pull request #1974 from ever-co/fix/tooltip-text-offline-page
Browse files Browse the repository at this point in the history
Updated Tooltip text and added offline page
  • Loading branch information
evereq authored Dec 7, 2023
2 parents 3b40fe2 + 30b5824 commit 2cb01a8
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 18 deletions.
18 changes: 13 additions & 5 deletions apps/web/components/pages/main/no-team.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useModal } from '@app/hooks';
import { useAuthenticateUser, useModal } from '@app/hooks';
import { clsxm } from '@app/utils';
import { Avatar, Button, Text } from 'lib/components';
import { Avatar, Button, Text, Tooltip } from 'lib/components';
import { CreateTeamModal } from 'lib/features';
import { PropsWithChildren } from 'react';
import { useTranslation } from 'react-i18next';
Expand All @@ -10,6 +10,7 @@ type Props = PropsWithChildren & React.ComponentPropsWithRef<'div'>;
const NoTeam = ({ className, ...rest }: Props) => {
const { t } = useTranslation();
const { isOpen, closeModal, openModal } = useModal();
const { user } = useAuthenticateUser();

return (
<div className={clsxm('flex justify-center items-center flex-col xs:mt-32 mt-8 mx-auto', className)} {...rest}>
Expand All @@ -22,9 +23,16 @@ const NoTeam = ({ className, ...rest }: Props) => {
{t('common.NO_TEAM_SUB')}
</p>
</div>
<Button className="mt-10 text-base font-medium capitalize" onClick={openModal}>
{t('common.CREATE_TEAM')}
</Button>

<Tooltip placement="auto" label={t('common.NO_TEAM_TOOLTIP')} enabled={!user?.isEmailVerified}>
<Button
className="mt-10 text-base font-medium capitalize"
onClick={openModal}
disabled={!user?.isEmailVerified}
>
{t('common.CREATE_TEAM')}
</Button>
</Tooltip>
<CreateTeamModal open={isOpen} closeModal={closeModal} />
</div>
);
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@sentry/nextjs": "^7.80.0",
"@tanstack/react-table": "^8.10.7",
"@types/react-google-recaptcha": "^2.1.5",
"@uidotdev/usehooks": "^2.4.1",

Check warning on line 43 in apps/web/package.json

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (uidotdev)

Check warning on line 43 in apps/web/package.json

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (usehooks)
"@vercel/analytics": "^0.1.6",
"autoprefixer": "^10.4.12",
"axios": "^1.1.2",
Expand Down
8 changes: 8 additions & 0 deletions apps/web/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ import { useTranslation } from 'react-i18next';
import { useState } from 'react';
import { IssuesView } from '@app/constants';
import { TableCellsIcon, QueueListIcon, Squares2X2Icon } from '@heroicons/react/24/solid';
import { useNetworkState } from '@uidotdev/usehooks';

Check warning on line 21 in apps/web/pages/index.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (uidotdev)

Check warning on line 21 in apps/web/pages/index.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (usehooks)

function MainPage() {
const { t } = useTranslation();
const { isTeamMember, isTrackingEnabled, activeTeam } = useOrganizationTeams();
const breadcrumb = [...(t('pages.home.BREADCRUMB', { returnObjects: true }) as any), activeTeam?.name || ''];
const [view, setView] = useState<IssuesView>(IssuesView.CARDS);
const { online } = useNetworkState();

if (!online) {
return (
<div className="flex w-full h-screen justify-center items-center text-xl">You are Currently Offline</div>
);
}

return (
<MainLayout>
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/ar/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"TRANSFER_TEAM": "نقل الفريق",
"TEAM_MEMBERS": "أعضاء الفريق",
"NO_TEAM": "أنشئ فريقك الخاص أو انضم إلى فريق موجود",
"NO_TEAM_SUB": "نص توضيحي مؤقت هنا",
"NO_TEAM_SUB": "من الرائع العمل مع الآخرين، لذا قم بإنشاء فريق وادعو الجميع للتعاون!",
"NO_TEAM_TOOLTIP": "تحتاج إلى التحقق من عنوان بريدك الإلكتروني",
"CANCEL": "إلغاء",
"DISCARD": "تجاهل",
"EXISTING_MEMBER": "عضو بالفعل",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/bg/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
"TRANSFER_TEAM": "Прехвърляне на отбор",
"TEAM_MEMBERS": "Членове на отбора",
"NO_TEAM": "Създайте собствен отбор или се присъединете към съществуващ",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Прекрасно е да се работи с други, затова създайте екип и поканете всички за сътрудничество!",
"NO_TEAM_TOOLTIP": "You need to verify your email address",
"CANCEL": "Отказ",
"DISCARD": "Изхвърляне",
"EXISTING_MEMBER": "Вече член",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "Team übertragen",
"TEAM_MEMBERS": "Teammitglieder",
"NO_TEAM": "Erstellen Sie Ihr eigenes Team oder treten Sie einem bestehenden bei",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Es ist großartig, mit anderen zusammenzuarbeiten, also erstelle ein Team und lade alle zur Zusammenarbeit ein!",
"NO_TEAM_TOOLTIP": "Sie müssen Ihre E-Mail-Adresse bestätigen",
"CANCEL": "Abbrechen",
"DISCARD": "Verwerfen",
"EXISTING_MEMBER": "Bereits Mitglied",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"TRANSFER_TEAM": "Transfer Team",
"TEAM_MEMBERS": "Team Members",
"NO_TEAM": "Create your own team or join existed",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "It's great to work with others so create a team and invite everyone to collaborate!",
"NO_TEAM_TOOLTIP": "You need to verify your email address",
"CANCEL": "Cancel",
"DISCARD": "Discard",
"EXISTING_MEMBER": "Already a Member",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
"TRANSFER_TEAM": "Transferir equipo",
"TEAM_MEMBERS": "Miembros del equipo",
"NO_TEAM": "Crea tu propio equipo o únete a uno existente",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Es genial trabajar con otros, así que ¡crea un equipo e invita a todos a colaborar!",
"NO_TEAM_TOOLTIP": "Necesitas verificar tu dirección de correo electrónico",
"CANCEL": "Cancelar",
"DISCARD": "Descartar",
"EXISTING_MEMBER": "Ya es miembro",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
"TRANSFER_TEAM": "Transférer l'équipe",
"TEAM_MEMBERS": "Membres de l'équipe",
"NO_TEAM": "Créez votre propre équipe ou rejoignez une équipe existante",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Il est génial de travailler avec d'autres, alors créez une équipe et invitez tout le monde à collaborer !",
"NO_TEAM_TOOLTIP": "Vous devez vérifier votre adresse e-mail",
"CANCEL": "Annuler",
"DISCARD": "Annuler",
"EXISTING_MEMBER": "Déjà membre",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/he/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "העבר צוות",
"TEAM_MEMBERS": "חברי צוות",
"NO_TEAM": "צור צוות משלך או הצטרף לקיים",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "זה נהדר לעבוד עם אחרים, לכן צור צוות והזמן את כולם לשתף פעולה!",
"NO_TEAM_TOOLTIP": "עליך לאמת את כתובת האימייל שלך",
"CANCEL": "בטל",
"DISCARD": "בטל",
"EXISTING_MEMBER": "כבר חבר",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/it/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "Transfer Team",
"TEAM_MEMBERS": "Team Members",
"NO_TEAM": "Create your own team or join existed",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "È fantastico lavorare con gli altri, quindi crea un team e invita tutti a collaborare!",
"NO_TEAM_TOOLTIP": "È necessario verificare il tuo indirizzo email",
"CANCEL": "Cancel",
"DISCARD": "Discard",
"EXISTING_MEMBER": "Already a Member",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/nl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "Team overdragen",
"TEAM_MEMBERS": "Teamleden",
"NO_TEAM": "Maak uw eigen team of sluit u aan bij een bestaand team",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Het is geweldig om met anderen samen te werken, dus creëer een team en nodig iedereen uit om samen te werken!",
"NO_TEAM_TOOLTIP": "Je moet je e-mailadres verifiëren",
"CANCEL": "Annuleren",
"DISCARD": "Negeren",
"EXISTING_MEMBER": "Al lid",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/pl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "Transfer Team",
"TEAM_MEMBERS": "Team Members",
"NO_TEAM": "Create your own team or join existed",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Świetnie jest pracować z innymi, więc stwórz zespół i zaproś wszystkich do współpracy!",
"NO_TEAM_TOOLTIP": "Musisz zweryfikować swój adres e-mail",
"CANCEL": "Cancel",
"DISCARD": "Discard",
"EXISTING_MEMBER": "Already a Member",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/pt/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "Transfer Team",
"TEAM_MEMBERS": "Team Members",
"NO_TEAM": "Create your own team or join existed",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "É ótimo trabalhar com os outros, então crie uma equipe e convide todos para colaborar!",
"NO_TEAM_TOOLTIP": "Você precisa verificar seu endereço de e-mail",
"CANCEL": "Cancel",
"DISCARD": "Discard",
"EXISTING_MEMBER": "Already a Member",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/ru/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "Transfer Team",
"TEAM_MEMBERS": "Team Members",
"NO_TEAM": "Create your own team or join existed",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "Замечательно работать с другими, поэтому создайте команду и пригласите всех к сотрудничеству!",
"NO_TEAM_TOOLTIP": "Вы должны подтвердить свой адрес электронной почты",
"CANCEL": "Cancel",
"DISCARD": "Discard",
"EXISTING_MEMBER": "Already a Member",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"TRANSFER_TEAM": "转让团队",
"TEAM_MEMBERS": "团队成员",
"NO_TEAM": "创建您自己的团队或加入已有团队",
"NO_TEAM_SUB": "Lorem ipsum dolor sit amet consectetur. Blandit lobortis dui risus neque.",
"NO_TEAM_SUB": "与他人合作是很棒的,所以创建一个团队,邀请每个人一起合作!",
"NO_TEAM_TOOLTIP": "您需要验证您的电子邮件地址",
"CANCEL": "取消",
"DISCARD": "放弃",
"EXISTING_MEMBER": "已是成员",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7135,6 +7135,11 @@
"@typescript-eslint/types" "6.8.0"
eslint-visitor-keys "^3.4.1"

"@uidotdev/usehooks@^2.4.1":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@uidotdev/usehooks/-/usehooks-2.4.1.tgz#4b733eaeae09a7be143c6c9ca158b56cc1ea75bf"
integrity sha512-1I+RwWyS+kdv3Mv0Vmc+p0dPYH0DTRAo04HLyXReYBL9AeseDWUJyi4THuksBJcu9F0Pih69Ak150VDnqbVnXg==

"@ungap/structured-clone@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
Expand Down

0 comments on commit 2cb01a8

Please sign in to comment.