mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-21 00:21:35 +02:00
fix: migrated team urls (#8982)
This commit is contained in:
@@ -82,7 +82,7 @@ export function DashboardPage(props: DashboardPageProps) {
|
|||||||
'striped-loader-slate': isLoading,
|
'striped-loader-slate': isLoading,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className="bg-slate-800/30 py-5 min-h-[70px]">
|
<div className="min-h-[70px] bg-slate-800/30 py-5">
|
||||||
<div className="container flex flex-wrap items-center gap-1.5">
|
<div className="container flex flex-wrap items-center gap-1.5">
|
||||||
{!isLoading && (
|
{!isLoading && (
|
||||||
<>
|
<>
|
||||||
@@ -107,7 +107,7 @@ export function DashboardPage(props: DashboardPageProps) {
|
|||||||
href: `/respond-invite?i=${team.memberId}`,
|
href: `/respond-invite?i=${team.memberId}`,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
href: `/team?t=${team._id}`,
|
href: `/teams/${team._id}/activity`,
|
||||||
})}
|
})}
|
||||||
avatar={avatarUrl}
|
avatar={avatarUrl}
|
||||||
/>
|
/>
|
||||||
@@ -116,8 +116,8 @@ export function DashboardPage(props: DashboardPageProps) {
|
|||||||
<DashboardTabButton
|
<DashboardTabButton
|
||||||
label="+ Create Team"
|
label="+ Create Team"
|
||||||
isActive={false}
|
isActive={false}
|
||||||
href="/team/new"
|
href="/teams/new"
|
||||||
className="border border-dashed border-slate-700 bg-transparent px-3 text-[13px] text-sm text-gray-500 hover:border-solid hover:border-slate-700 hover:text-gray-400"
|
className="border border-dashed border-slate-700 bg-transparent px-3 text-sm text-[13px] text-gray-500 hover:border-solid hover:border-slate-700 hover:text-gray-400"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@@ -26,7 +26,7 @@ export function DropdownTeamList(props: DropdownTeamListProps) {
|
|||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const { response, error } = await httpGet<TeamListResponse>(
|
const { response, error } = await httpGet<TeamListResponse>(
|
||||||
`${import.meta.env.PUBLIC_API_URL}/v1-get-user-teams`
|
`${import.meta.env.PUBLIC_API_URL}/v1-get-user-teams`,
|
||||||
);
|
);
|
||||||
if (error || !response) {
|
if (error || !response) {
|
||||||
toast.error(error?.message || 'Something went wrong');
|
toast.error(error?.message || 'Something went wrong');
|
||||||
@@ -73,7 +73,7 @@ export function DropdownTeamList(props: DropdownTeamListProps) {
|
|||||||
if (team.status === 'invited') {
|
if (team.status === 'invited') {
|
||||||
pageLink = `/respond-invite?i=${team.memberId}`;
|
pageLink = `/respond-invite?i=${team.memberId}`;
|
||||||
} else if (team.status === 'joined') {
|
} else if (team.status === 'joined') {
|
||||||
pageLink = `/team/activity?t=${team._id}`;
|
pageLink = `/teams/${team._id}/activity`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -95,7 +95,7 @@ export function DropdownTeamList(props: DropdownTeamListProps) {
|
|||||||
No teams found.{' '}
|
No teams found.{' '}
|
||||||
<a
|
<a
|
||||||
className="font-medium text-slate-400 underline underline-offset-2 hover:text-slate-300"
|
className="font-medium text-slate-400 underline underline-offset-2 hover:text-slate-300"
|
||||||
href="/team/new"
|
href="/teams/new"
|
||||||
>
|
>
|
||||||
Create a team
|
Create a team
|
||||||
</a>
|
</a>
|
||||||
|
@@ -34,7 +34,7 @@ export function RespondInviteForm() {
|
|||||||
|
|
||||||
async function loadInvitation(inviteId: string) {
|
async function loadInvitation(inviteId: string) {
|
||||||
const { response, error } = await httpGet<InvitationResponse>(
|
const { response, error } = await httpGet<InvitationResponse>(
|
||||||
`${import.meta.env.PUBLIC_API_URL}/v1-get-invitation/${inviteId}`
|
`${import.meta.env.PUBLIC_API_URL}/v1-get-invitation/${inviteId}`,
|
||||||
);
|
);
|
||||||
if (error || !response) {
|
if (error || !response) {
|
||||||
setError(error?.message || 'Something went wrong');
|
setError(error?.message || 'Something went wrong');
|
||||||
@@ -64,7 +64,7 @@ export function RespondInviteForm() {
|
|||||||
`${import.meta.env.PUBLIC_API_URL}/v1-respond-invite/${inviteId}`,
|
`${import.meta.env.PUBLIC_API_URL}/v1-respond-invite/${inviteId}`,
|
||||||
{
|
{
|
||||||
status,
|
status,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
if (error || !response) {
|
if (error || !response) {
|
||||||
setError(error?.message || 'Something went wrong');
|
setError(error?.message || 'Something went wrong');
|
||||||
@@ -75,7 +75,7 @@ export function RespondInviteForm() {
|
|||||||
window.location.href = '/';
|
window.location.href = '/';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.location.href = `/team/activity?t=${response.teamId}`;
|
window.location.href = `/teams/${response.teamId}/activity`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLoadingInvite) {
|
if (isLoadingInvite) {
|
||||||
@@ -85,7 +85,7 @@ export function RespondInviteForm() {
|
|||||||
if (!invite) {
|
if (!invite) {
|
||||||
return (
|
return (
|
||||||
<div className="container text-center">
|
<div className="container text-center">
|
||||||
<ErrorIcon2 className="mx-auto mb-4 mt-24 w-20 opacity-20" />
|
<ErrorIcon2 className="mx-auto mt-24 mb-4 w-20 opacity-20" />
|
||||||
|
|
||||||
<h2 className={'mb-1 text-2xl font-bold'}>Error</h2>
|
<h2 className={'mb-1 text-2xl font-bold'}>Error</h2>
|
||||||
<p className="mb-4 text-base leading-6 text-gray-600">
|
<p className="mb-4 text-base leading-6 text-gray-600">
|
||||||
@@ -106,7 +106,7 @@ export function RespondInviteForm() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container text-center">
|
<div className="container text-center">
|
||||||
<BuildingIcon className="mx-auto mb-4 mt-24 w-20 h-20 opacity-20" />
|
<BuildingIcon className="mx-auto mt-24 mb-4 h-20 w-20 opacity-20" />
|
||||||
|
|
||||||
<h2 className={'mb-1 text-2xl font-bold'}>Join Team</h2>
|
<h2 className={'mb-1 text-2xl font-bold'}>Join Team</h2>
|
||||||
<p className="mb-3 text-base leading-6 text-gray-600">
|
<p className="mb-3 text-base leading-6 text-gray-600">
|
||||||
@@ -139,7 +139,7 @@ export function RespondInviteForm() {
|
|||||||
pageProgressMessage.set('');
|
pageProgressMessage.set('');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
className="grow cursor-pointer rounded-lg hover:bg-gray-300 bg-gray-200 px-3 py-2 text-center"
|
className="grow cursor-pointer rounded-lg bg-gray-200 px-3 py-2 text-center hover:bg-gray-300"
|
||||||
>
|
>
|
||||||
Accept
|
Accept
|
||||||
</button>
|
</button>
|
||||||
@@ -150,7 +150,7 @@ export function RespondInviteForm() {
|
|||||||
pageProgressMessage.set('');
|
pageProgressMessage.set('');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
className="grow cursor-pointer rounded-lg bg-red-500 hover:bg-red-600 px-3 py-2 text-white disabled:opacity-40"
|
className="grow cursor-pointer rounded-lg bg-red-500 px-3 py-2 text-white hover:bg-red-600 disabled:opacity-40"
|
||||||
>
|
>
|
||||||
Reject
|
Reject
|
||||||
</button>
|
</button>
|
||||||
|
Reference in New Issue
Block a user