fix(dashboard): Reduce data loaded by product details page (#9991)
This commit is contained in:
1 parent
e229bea3c1
commit
49f3f0cd54
3 files changed
+9
-6
No files matched your search
@@ -13,7 +13,7 @@ export const SectionRow = ({ title, value, actions }: SectionRowProps) => {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clx(
|
className={clx(
|
||||||
`text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4`,
|
`text-ui-fg-subtle grid w-full grid-cols-2 items-center gap-4 px-6 py-4`,
|
||||||
{
|
{
|
||||||
"grid-cols-[1fr_1fr_28px]": !!actions,
|
"grid-cols-[1fr_1fr_28px]": !!actions,
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -70,12 +70,12 @@ const Root = <TData,>({
|
|||||||
const showExtraData = showJSON || showMetadata
|
const showExtraData = showJSON || showMetadata
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-y-3">
|
<div className="flex w-full flex-col gap-y-3">
|
||||||
{before.map((Component, i) => {
|
{before.map((Component, i) => {
|
||||||
return <Component {...widgetProps} key={i} />
|
return <Component {...widgetProps} key={i} />
|
||||||
})}
|
})}
|
||||||
<div className="flex flex-col gap-x-4 gap-y-3 xl:flex-row xl:items-start">
|
<div className="flex w-full flex-col items-start gap-x-4 gap-y-3 xl:grid xl:grid-cols-[minmax(0,_1fr)_440px]">
|
||||||
<div className="flex w-full flex-col gap-y-3">
|
<div className="flex w-full min-w-0 flex-col gap-y-3">
|
||||||
{main}
|
{main}
|
||||||
{after.map((Component, i) => {
|
{after.map((Component, i) => {
|
||||||
return <Component {...widgetProps} key={i} />
|
return <Component {...widgetProps} key={i} />
|
||||||
@@ -87,7 +87,7 @@ const Root = <TData,>({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex w-full max-w-[100%] flex-col gap-y-3 xl:mt-0 xl:max-w-[440px]">
|
<div className="flex w-full flex-col gap-y-3 xl:mt-0">
|
||||||
{sideBefore.map((Component, i) => {
|
{sideBefore.map((Component, i) => {
|
||||||
return <Component {...widgetProps} key={i} />
|
return <Component {...widgetProps} key={i} />
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
import { getLinkedFields } from "../../../extensions"
|
import { getLinkedFields } from "../../../extensions"
|
||||||
|
|
||||||
export const PRODUCT_DETAIL_FIELDS = getLinkedFields("product", "*categories")
|
export const PRODUCT_DETAIL_FIELDS = getLinkedFields(
|
||||||
|
"product",
|
||||||
|
"*categories,-variants"
|
||||||
|
)
|
||||||
Reference in new issue
Block a user