diff --git a/client/src/containers/countries/countries-table.tsx b/client/src/containers/countries/countries-table.tsx
index 2ef86902..89ecc2a6 100644
--- a/client/src/containers/countries/countries-table.tsx
+++ b/client/src/containers/countries/countries-table.tsx
@@ -104,42 +104,48 @@ const CountriesTable = () => {
{v.isResource ? (
v.resources?.length ? (
- v.resources?.map((r) => (
-
-
- {r.link_title}
-
-
-
-
+ v.resources?.map((r) => {
+ if (!/^https?:\/\/|^www\./i.test(r.link_url)) {
+ r.link_url = `https://${r.link_url}`;
+ }
-
-
- {r.link_title}
-
- {r.description}
-
+
+ {r.link_title}
+
+
+
- Learn more
-
-
-
-
- ))
+
+
+
+
+ {r.link_title}
+
+ {r.description}
+
+ Learn more
+
+
+
+
+ );
+ })
) : (
"-"
)
diff --git a/client/src/containers/countries/utils.ts b/client/src/containers/countries/utils.ts
index 1f694e9c..0ca0c852 100644
--- a/client/src/containers/countries/utils.ts
+++ b/client/src/containers/countries/utils.ts
@@ -125,7 +125,7 @@ const useTableData = () => {
isDatasetValueProperty(value_type) &&
datasetValue?.attributes?.[value_type];
const country = countriesData?.data?.find((c1) => c1.attributes?.iso3 === c);
- console.log({ country, c, datasetValue, value });
+
return {
iso3: c,
countryLink: country?.attributes?.link,
diff --git a/cms/src/api/resource/content-types/resource/schema.json b/cms/src/api/resource/content-types/resource/schema.json
index 5f1b6102..2ea6b541 100644
--- a/cms/src/api/resource/content-types/resource/schema.json
+++ b/cms/src/api/resource/content-types/resource/schema.json
@@ -4,7 +4,8 @@
"info": {
"singularName": "resource",
"pluralName": "resources",
- "displayName": "Resource"
+ "displayName": "Resource",
+ "description": ""
},
"options": {
"draftAndPublish": true
@@ -17,7 +18,8 @@
},
"link_url": {
"type": "text",
- "required": true
+ "required": true,
+ "regex": "/^(https?:\\/\\/|www\\.)[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}(\\/[^\\s]*)?$/"
},
"description": {
"type": "text"
diff --git a/cms/types/generated/contentTypes.d.ts b/cms/types/generated/contentTypes.d.ts
index 902863a0..87c6d90f 100644
--- a/cms/types/generated/contentTypes.d.ts
+++ b/cms/types/generated/contentTypes.d.ts
@@ -1489,6 +1489,7 @@ export interface ApiResourceResource extends Schema.CollectionType {
singularName: 'resource';
pluralName: 'resources';
displayName: 'Resource';
+ description: '';
};
options: {
draftAndPublish: true;
|