UI : Label fixes for Errorplaceholder in User page (#8960)

* UI label fixes for errorplaceholder in User page

* minor changes

* added fix for server error

Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com>
This commit is contained in:
Ashish Gupta 2022-11-23 14:35:55 +05:30 committed by GitHub
parent 8a95ec1329
commit 9fca00b465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 10 deletions

View File

@ -191,7 +191,7 @@ const Explore: React.FC<ExploreProps> = ({
});
} catch {
showErrorToast(
t('message.entity-fetch-error', {
t('server.entity-fetch-error', {
entity: `profile details for table ${source?.name || ''}`,
})
);

View File

@ -562,7 +562,7 @@ const TeamDetailsV1 = ({
} catch (error) {
showErrorToast(
error as AxiosError,
t('message.entity-fetch-error', {
t('server.entity-fetch-error', {
entity: 'User Permissions',
})
);

View File

@ -942,8 +942,12 @@ const Users = ({
) : (
<ErrorPlaceHolder>
{tabNumber === 3
? t('message.no-owned-entities')
: t('message.no-followed-entities')}
? t('server.no-user-entities', {
type: 'owned',
})
: t('server.no-user-entities', {
type: 'followed',
})}
</ErrorPlaceHolder>
)}
</div>

View File

@ -380,8 +380,7 @@
"all-charts-are-mapped": "All charts are mapped with existing KPIs."
},
"server": {
"no-followed-entities": "You have not followed anything yet.",
"no-owned-entities": "You have not owned anything yet.",
"no-user-entities": "You have not {{type}} anything yet.",
"no-task-available": "No task data is available",
"entity-fetch-error": "Error while fetching {{entity}}",
"feed-post-error": "Error while posting the message!",

View File

@ -104,7 +104,7 @@ const UserPage = () => {
.catch((err: AxiosError) => {
showErrorToast(
err,
t('message.entity-fetch-error', {
t('server.entity-fetch-error', {
entity: 'User Details',
})
);
@ -152,7 +152,7 @@ const UserPage = () => {
.catch((err: AxiosError) => {
showErrorToast(
err,
t('message.entity-fetch-error', {
t('server.entity-fetch-error', {
entity: `${fetchOwnedEntities ? 'Owned' : 'Follwing'} Entities`,
})
);
@ -207,7 +207,7 @@ const UserPage = () => {
.catch((err: AxiosError) => {
showErrorToast(
err,
t('message.entity-fetch-error', {
t('server.entity-fetch-error', {
entity: 'Activity Feeds',
})
);

View File

@ -503,7 +503,7 @@ const TeamsPage = () => {
.catch((err: AxiosError) => {
showErrorToast(
err,
t('message.entity-fetch-error', {
t('server.entity-fetch-error', {
entity: 'Team Assets',
})
);