From 19889e0b036988faabeba2329c2452bfc24a5029 Mon Sep 17 00:00:00 2001 From: Takeshi Kimata <117462761+kimatata@users.noreply.github.com> Date: Thu, 21 Nov 2024 22:23:12 +0900 Subject: [PATCH] feat: show projects link when not own any projects (#104) --- frontend/messages/en.json | 4 +++- frontend/messages/ja.json | 3 ++- frontend/src/app/[locale]/account/AccountPage.tsx | 15 ++++++++++++--- frontend/src/app/[locale]/account/page.tsx | 2 ++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/frontend/messages/en.json b/frontend/messages/en.json index fdb10f7..5ea95c8 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -111,7 +111,9 @@ "your_projects": "Your Projects", "public": "Public", "private": "Private", - "no_projects_found": "No projects found" + "no_projects_found": "No projects found", + "not_own_any_projects": "You don't own any projects.", + "find_projects": "Find projects" }, "Admin": { "user_management": "User Management", diff --git a/frontend/messages/ja.json b/frontend/messages/ja.json index 4010e50..a347664 100644 --- a/frontend/messages/ja.json +++ b/frontend/messages/ja.json @@ -112,7 +112,8 @@ "your_projects": "保有プロジェクト", "public": "パブリック", "private": "プライベート", - "no_projects_found": "プロジェクトがありません" + "not_own_any_projects": "所有しているプロジェクトがありません。", + "find_projects": "プロジェクトを探す" }, "Admin": { "user_management": "ユーザー管理", diff --git a/frontend/src/app/[locale]/account/AccountPage.tsx b/frontend/src/app/[locale]/account/AccountPage.tsx index 84bb19e..13ce424 100644 --- a/frontend/src/app/[locale]/account/AccountPage.tsx +++ b/frontend/src/app/[locale]/account/AccountPage.tsx @@ -1,19 +1,21 @@ 'use client'; import { useState, useEffect, useContext } from 'react'; import { Link, NextUiLinkClasses } from '@/src/navigation'; -import { Card, CardHeader, CardFooter } from '@nextui-org/react'; +import { Button, Card, CardHeader, CardFooter } from '@nextui-org/react'; import { TokenContext } from '@/utils/TokenProvider'; import Avatar from 'boring-avatars'; import { fetchMyProjects } from '@/utils/projectsControl'; import { ProjectType } from '@/types/project'; import PublicityChip from '@/components/PublicityChip'; import { LocaleCodeType } from '@/types/locale'; +import { ArrowRight } from 'lucide-react'; type AccountPageMessages = { yourProjects: string; public: string; private: string; - noProjectsFound: string; + notOwnAnyProjects: string; + findProjects: string; }; type Props = { @@ -82,7 +84,14 @@ export default function AccountPage({ messages, locale }: Props) { ); }) ) : ( -