Compare commits
No commits in common. "ed0d9f9f171c6cbebf76c2c393571f5fd64e792f" and "0d3fe65a6df6c7ab5750349e289ce39e11f3492d" have entirely different histories.
ed0d9f9f17
...
0d3fe65a6d
|
|
@ -30,9 +30,6 @@ function extractOverviewFromData(data: Record<string, unknown> | undefined): str
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_QI_BLOOD_OVERVIEW =
|
|
||||||
"Qi and Blood (Qi Xue) pattern identification assesses disharmonies in the fundamental vital substances of the body. Pathological changes in Qi, Blood, and Body Fluids reflect deficiencies, stagnation, rebellion, and collapse affecting overall vitality and organ function.";
|
|
||||||
|
|
||||||
export function QiBloodCollectionRenderer(props: CollectionRendererProps) {
|
export function QiBloodCollectionRenderer(props: CollectionRendererProps) {
|
||||||
// Dynamically load the overview from the module's identification template (m0013_ct0006)
|
// Dynamically load the overview from the module's identification template (m0013_ct0006)
|
||||||
const overviewQuery = useSingleTemplateContentQuery({
|
const overviewQuery = useSingleTemplateContentQuery({
|
||||||
|
|
@ -42,10 +39,9 @@ export function QiBloodCollectionRenderer(props: CollectionRendererProps) {
|
||||||
|
|
||||||
const overviewText = useMemo(() => {
|
const overviewText = useMemo(() => {
|
||||||
if (overviewQuery.resolution.status === "ready") {
|
if (overviewQuery.resolution.status === "ready") {
|
||||||
const extracted = extractOverviewFromData(overviewQuery.resolution.data);
|
return extractOverviewFromData(overviewQuery.resolution.data);
|
||||||
if (extracted) return extracted;
|
|
||||||
}
|
}
|
||||||
return DEFAULT_QI_BLOOD_OVERVIEW;
|
return "";
|
||||||
}, [overviewQuery.resolution]);
|
}, [overviewQuery.resolution]);
|
||||||
|
|
||||||
// Filter out the identification entry from the category cards list, leaving only the 4 categories
|
// Filter out the identification entry from the category cards list, leaving only the 4 categories
|
||||||
|
|
@ -131,20 +127,22 @@ export function QiBloodCardRenderer({
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
headerContainer: {
|
headerContainer: {
|
||||||
paddingBottom: verticalScale(8),
|
paddingHorizontal: moderateScale(16),
|
||||||
gap: verticalScale(14),
|
paddingTop: verticalScale(14),
|
||||||
|
paddingBottom: verticalScale(4),
|
||||||
|
gap: verticalScale(12),
|
||||||
},
|
},
|
||||||
overviewCard: {
|
overviewCard: {
|
||||||
backgroundColor: "#FFFFFF",
|
backgroundColor: "#FFFFFF",
|
||||||
borderRadius: moderateScale(16),
|
borderRadius: moderateScale(16),
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: "#E2EAE5",
|
borderColor: "#E2EAE5",
|
||||||
padding: moderateScale(18),
|
padding: moderateScale(16),
|
||||||
},
|
},
|
||||||
overviewHeader: {
|
overviewHeader: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
marginBottom: verticalScale(10),
|
marginBottom: verticalScale(8),
|
||||||
gap: moderateScale(8),
|
gap: moderateScale(8),
|
||||||
},
|
},
|
||||||
overviewTitle: {
|
overviewTitle: {
|
||||||
|
|
@ -153,12 +151,12 @@ const styles = StyleSheet.create({
|
||||||
color: Colors.textPrimary,
|
color: Colors.textPrimary,
|
||||||
},
|
},
|
||||||
overviewText: {
|
overviewText: {
|
||||||
fontSize: moderateScale(14),
|
fontSize: moderateScale(13),
|
||||||
lineHeight: moderateScale(22),
|
lineHeight: verticalScale(20),
|
||||||
color: Colors.textSecondary,
|
color: Colors.textSecondary,
|
||||||
},
|
},
|
||||||
sectionHeading: {
|
sectionHeading: {
|
||||||
fontSize: moderateScale(16),
|
fontSize: moderateScale(15),
|
||||||
fontWeight: "700",
|
fontWeight: "700",
|
||||||
color: Colors.textPrimary,
|
color: Colors.textPrimary,
|
||||||
marginLeft: moderateScale(4),
|
marginLeft: moderateScale(4),
|
||||||
|
|
|
||||||
|
|
@ -350,12 +350,12 @@ const styles = StyleSheet.create({
|
||||||
borderRadius: moderateScale(16),
|
borderRadius: moderateScale(16),
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: "#E2EAE5",
|
borderColor: "#E2EAE5",
|
||||||
padding: moderateScale(18),
|
padding: moderateScale(16),
|
||||||
},
|
},
|
||||||
overviewHeader: {
|
overviewHeader: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
marginBottom: verticalScale(10),
|
marginBottom: verticalScale(8),
|
||||||
gap: moderateScale(8),
|
gap: moderateScale(8),
|
||||||
},
|
},
|
||||||
overviewTitle: {
|
overviewTitle: {
|
||||||
|
|
@ -364,8 +364,8 @@ const styles = StyleSheet.create({
|
||||||
color: Colors.textPrimary,
|
color: Colors.textPrimary,
|
||||||
},
|
},
|
||||||
overviewText: {
|
overviewText: {
|
||||||
fontSize: moderateScale(14),
|
fontSize: moderateScale(13),
|
||||||
lineHeight: moderateScale(22),
|
lineHeight: verticalScale(20),
|
||||||
color: Colors.textSecondary,
|
color: Colors.textSecondary,
|
||||||
},
|
},
|
||||||
patternsContainer: {
|
patternsContainer: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue