chore(dashboard): text changes and fixes (#7925)
- Improvements to existing texts - Add subtitles to sections where useful. - Added the ability to edit the message shown in a list when no records are found + change the message where necessary - Change documentation link to `https://docs.medusajs.com/v2`.
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { Button, Text, clx } from "@medusajs/ui"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { Link } from "react-router-dom"
|
||||
|
||||
type NoResultsProps = {
|
||||
export type NoResultsProps = {
|
||||
title?: string
|
||||
message?: string
|
||||
className?: string
|
||||
|
||||
@@ -319,11 +319,7 @@ const LoggedInUser = () => {
|
||||
<Profile />
|
||||
<DropdownMenu.Separator />
|
||||
<DropdownMenu.Item asChild>
|
||||
<Link
|
||||
// TODO change link once docs are public
|
||||
to="https://medusa-docs-v2-git-docs-v2-medusajs.vercel.app/"
|
||||
target="_blank"
|
||||
>
|
||||
<Link to="https://docs.medusajs.com/v2" target="_blank">
|
||||
<BookOpen className="text-ui-fg-subtle mr-2" />
|
||||
Documentation
|
||||
</Link>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { clx } from "@medusajs/ui"
|
||||
import { memo } from "react"
|
||||
import { NoRecords } from "../../common/empty-table-content"
|
||||
import { NoRecords, NoResultsProps } from "../../common/empty-table-content"
|
||||
import { TableSkeleton } from "../../common/skeleton"
|
||||
import { DataTableQuery, DataTableQueryProps } from "./data-table-query"
|
||||
import { DataTableRoot, DataTableRootProps } from "./data-table-root"
|
||||
@@ -11,6 +11,7 @@ interface DataTableProps<TData>
|
||||
isLoading?: boolean
|
||||
pageSize: number
|
||||
queryObject?: Record<string, any>
|
||||
noRecords?: Pick<NoResultsProps, "title" | "message">
|
||||
}
|
||||
|
||||
// Maybe we should use the memoized version of DataTableRoot
|
||||
@@ -32,6 +33,7 @@ export const DataTable = <TData,>({
|
||||
pageSize,
|
||||
isLoading = false,
|
||||
layout = "fit",
|
||||
noRecords: noRecordsProps = {},
|
||||
}: DataTableProps<TData>) => {
|
||||
if (isLoading) {
|
||||
return (
|
||||
@@ -57,6 +59,7 @@ export const DataTable = <TData,>({
|
||||
className={clx({
|
||||
"flex h-full flex-col overflow-hidden": layout === "fill",
|
||||
})}
|
||||
{...noRecordsProps}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user