Merge pull request #36 from chromakode/add-column-types

Add support for url, email, phone_number types
This commit is contained in:
Tobias Lins
2021-02-21 16:20:13 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -38,7 +38,10 @@ export type ColumnType =
| "multi_select"
| "number"
| "relation"
| "file";
| "file"
| "email"
| "phone_number"
| "url";
export type ColumnSchemaType = {
name: string;

View File

@@ -39,6 +39,9 @@ export const getNotionValue = (
case "title":
return getTextContent(val);
case "select":
case "email":
case "phone_number":
case "url":
return val[0][0];
case "multi_select":
return val[0][0].split(",") as string[];