feat(dashboard): Secret keys domain (#7030)
* setup secret keys * add secret keys * fix merge
This commit is contained in:
committed by
GitHub
parent
8eb2a4156d
commit
21be6ff7ed
+17
-1
@@ -2,6 +2,9 @@ import { createColumnHelper } from "@tanstack/react-table"
|
||||
|
||||
import { SalesChannelDTO } from "@medusajs/types"
|
||||
import { useMemo } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { StatusCell } from "../../../components/table/table-cells/common/status-cell"
|
||||
import { TextHeader } from "../../../components/table/table-cells/common/text-cell"
|
||||
import {
|
||||
DescriptionCell,
|
||||
DescriptionHeader,
|
||||
@@ -14,6 +17,8 @@ import {
|
||||
const columnHelper = createColumnHelper<SalesChannelDTO>()
|
||||
|
||||
export const useSalesChannelTableColumns = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return useMemo(
|
||||
() => [
|
||||
columnHelper.accessor("name", {
|
||||
@@ -24,7 +29,18 @@ export const useSalesChannelTableColumns = () => {
|
||||
header: () => <DescriptionHeader />,
|
||||
cell: ({ getValue }) => <DescriptionCell description={getValue()} />,
|
||||
}),
|
||||
columnHelper.accessor("is_disabled", {
|
||||
header: () => <TextHeader text={t("fields.status")} />,
|
||||
cell: ({ getValue }) => {
|
||||
const value = getValue()
|
||||
return (
|
||||
<StatusCell color={value ? "grey" : "green"}>
|
||||
{value ? t("general.disabled") : t("general.enabled")}
|
||||
</StatusCell>
|
||||
)
|
||||
},
|
||||
}),
|
||||
],
|
||||
[]
|
||||
[t]
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user