-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the journals not found data preview alert (#1424)
- Loading branch information
1 parent
e679c93
commit 2715060
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/components/collection/DataPreview/NoCollectionJournalsAlert.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { authenticatedRoutes } from 'app/routes'; | ||
import MessageWithButton from 'components/content/MessageWithButton'; | ||
import { useNavigate } from 'react-router'; | ||
|
||
export default function NoCollectionJournalsAlert() { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<MessageWithButton | ||
messageId="collectionsPreview.notFound.message" | ||
clickHandler={() => { | ||
navigate(authenticatedRoutes.captures.fullPath); | ||
}} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import { CommonMessages } from './CommonMessages'; | ||
import { Details } from './Details'; | ||
import { RouteTitles } from './RouteTitles'; | ||
|
||
export const Collections: Record<string, string> = { | ||
'collectionsTable.title': `Collections`, | ||
'collectionsTable.cta.new': `New ${CommonMessages['terms.transformation']}`, | ||
'collectionsTable.detailsCTA': `Details`, | ||
'collectionsTable.filterLabel': `Filter collections`, | ||
'collectionsPreview.notFound.message': `We were unable to find any data which could mean the capture has not ingested data yet or is not running. Check the status on the Captures page to make sure it is running.`, | ||
'collectionsPreview.notFound.message': `We were unable to find any data which could mean the capture has not ingested data yet or is not running. Check the status on the {button} to make sure it is running.`, | ||
'collectionsPreview.notFound.message.button': `${RouteTitles['routeTitle.captures']} page`, | ||
'collectionsPreview.notFound.message.derivation': `We were unable to find any data which could mean the derivation has not ingested data yet or is not running. Check the status in the ${Details['detailsPanel.shardDetails.title']} section to make sure it is running.`, | ||
}; |