aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/(dash)
diff options
context:
space:
mode:
authorcodetorso <[email protected]>2024-07-25 10:56:32 +0530
committercodetorso <[email protected]>2024-07-25 10:56:32 +0530
commitc7b98a39b8024c96f1230a513a6d64d763b74277 (patch)
tree0bc3260cfce7cbf5666948f21864806b6d2a9760 /apps/web/app/(dash)
parentparse suggestions for handling edge case (diff)
downloadsupermemory-c7b98a39b8024c96f1230a513a6d64d763b74277.tar.xz
supermemory-c7b98a39b8024c96f1230a513a6d64d763b74277.zip
let's go boys!! canvas
Diffstat (limited to 'apps/web/app/(dash)')
-rw-r--r--apps/web/app/(dash)/menu.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx
index c56a3247..cedcd5d2 100644
--- a/apps/web/app/(dash)/menu.tsx
+++ b/apps/web/app/(dash)/menu.tsx
@@ -62,6 +62,12 @@ function Menu() {
url: "/memories",
disabled: false,
},
+ {
+ icon: CanvasIcon,
+ text: "Thinkpad",
+ url: "/thinkpad",
+ disabled: false,
+ },
];
const [content, setContent] = useState("");
@@ -76,9 +82,7 @@ function Menu() {
content.match(/https?:\/\/(x\.com|twitter\.com)\/[\w]+\/[\w]+\/[\d]+/)
) {
return "tweet";
- } else if (content.match(/https?:\/\/[\w\.]+/)) {
- return "page";
- } else if (content.match(/https?:\/\/www\.[\w\.]+/)) {
+ } else if (content.match(/^(https?:\/\/)?(www\.)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(\/.*)?$/i)) {
return "page";
} else {
return "note";