Date: Fri, 19 Aug 2022 07:41:08 +0800
Subject: [PATCH 08/11] use latest prisma-client-rust
---
Cargo.lock | Bin 165043 -> 170602 bytes
core/Cargo.toml | 16 +++++++++++++---
core/prisma/Cargo.toml | 5 ++++-
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index c143a58ec412a659813abb47ca2d51b9943e242e..d4285c8fed94c934c71b81c163f37088f0f960a1 100644
GIT binary patch
delta 6406
zcmcIoYmA)LdDa=Q*Sm`^>&q-QUNdWBCpF&9xnF3^LeiwfHej37ZDKdhxn>7;XVx=g
za2zfsG${y52%qB9A1#TcQWB+#NH^)UDTzR8m8umbpeRWrVxYOSrBQ%NNGYMD?>D69GAJ)iQp8cE84Faf5V?vfKfMc8ix;0T;3d{%Z${ORo9e>G7ubymWfJeaF8S+jjcm&v$)&{@I57>4(q_
zvwhbe8{89owA2emy;Dlr0DpTq=iJWbU#^C?@Y#4@xp=C
z#U1s5V%PrN#l!pm>HIHPJaK^cPqk;pIv<{i?b(+P+_h){78%`DExzkk=Holi@a&NP
z;R3CZAO8*-EGFy!a{iA{Ud-0wu^X4=qf_Y8i`#xOPTP&!25KAUhGXthzi
z;{HGTjoD8=^>5>APXlM;z|FDMt~VRC?X`_~+~gsK_D)bHH6xH9hC}iP!kBl)G76az
zqZBSevM^?~hs-B|avdqf)N-A4lG+yb;c9X4b4&BLj-hqM+p3H5&Yz8%h$@P>!fi)QEB?`HKMx
z&P%`Fmp34^_RH@>Vo`VRVzlD|q>E23-+N^gG&;#Nb}~>)aCD3_ZllLq3#K?XI0>hz
zFGDY&_Gw6Z&AibLc2#`i1H;9WoBR8wW2aU3?R@F-%4q&rKN>E+@WS2+!prgj6A{Xs
z)WL9qHEhgc6F5YPSOVY1V1yGqhyb^3EEik}sIEAb1+AF*%98%t#xv)?Wd6fgJTlX4
zbz*C5rqzUJlkspnANnD36Gp&QI41!smOH~RPdp@LoY6jb6QFo00?RTig*C}rLOjM^
z1Vc1&v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$`8d1^*|h-T%EkZH$ArDIUiMHFBBG--
z2_?m;WJn>EFd?vDltkPU-h?Q`!jqK8NJX3_A`x+t7!(VQ?ADJqWgUy4x57^w=UrzEvpYJB$g_
zL@SPoiMZQZ4Ncjli`?^fLeZUWhU)Bi5$>zVg-C8sGn~w4=P#UsCik-z_(eY3ztRf3?UjM5
z?D00ZrzRhaXMf{~F>`U*4T)tB-vZMW+3!2y{-SHU1Agm%<$|TI{*$o5Z5i?tM`L9~
zg1w-Gq$)}^6QQCZi3Bw=5-3R((pYQBLgN{LLlGI4P$7^A~J(z?t
z!ZkJ;bB;Z4)5LcLVb69J?dU*(Vf2nA9AlxLA9IsGHlNU
z(hq@>Yi{#RLQO-L+kF)lyYF0u)$V)K@L?BCLWjFN<AgU!c1_B`
zkqP(m-Uawowr}uew`?D@+S6bETz2>?@cqg@i5MY<&=6xvMaY~D?J7W+`slil1uTO??27ixdTwh
zNt5s7b<3erP-s+RqvPX=mcw1UCiSHDGu}^Mcj5^cbC1kGxBL4HwAaitT&s!EG51Ux
zthaBzy~=&@AZ*F5AA}zT**Bhqlhs-2FkA>~-t`FX$8Ev7tn<4tTa`!Eve+#!!TOYgXQ3aL+;$
za;!LK{x%T$8-jNnj5BU!Q^D3Bt#zNj;ODsb3;Z;v>GIBiEYG)%L-~}(v-Ey<>s4^`
zn&7VS8f?pk{sB|By19?}k;TK%*CFvmB2;^$=PxNKPGaSK59ccOW(;w~A|^x31@fMS
zG9CF+5uzngXyIn!T}xH=*4??x=d~2yY+8q=#zCJi!mp$JbtjWm=&9wx~
Wjcg7Y-2N@Wwp`95yQ42yx9LAu50=6J
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 3eddc564e..2399c855c 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -8,7 +8,8 @@ repository = "https://github.com/spacedriveapp/spacedrive"
edition = "2021"
[features]
-p2p = [] # This feature controlls whether the Spacedrive Core contains the Peer to Peer syncing engine (It isn't required for the hosted core so we can disable it).
+p2p = [
+] # This feature controlls whether the Spacedrive Core contains the Peer to Peer syncing engine (It isn't required for the hosted core so we can disable it).
[dependencies]
hostname = "0.3.1"
@@ -26,8 +27,17 @@ rmp = "^0.8.11"
rmp-serde = "^1.1.0"
# Project dependencies
-prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", branch = "0.6.0", features = ["rspc"] }
-rspc = { version = "0.0.4", features = ["axum", "tauri", "uuid", "chrono", "tracing"] }
+prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", rev = "6a0119bce951c8d956542a59b2f783fc5a591fc7", features = [
+ "rspc",
+ "sqlite-create-many",
+] }
+rspc = { version = "0.0.4", features = [
+ "axum",
+ "tauri",
+ "uuid",
+ "chrono",
+ "tracing",
+] }
walkdir = "^2.3.2"
uuid = { version = "1.1.2", features = ["v4", "serde"] }
sysinfo = "0.23.9"
diff --git a/core/prisma/Cargo.toml b/core/prisma/Cargo.toml
index d9b60cd5a..b24c05939 100644
--- a/core/prisma/Cargo.toml
+++ b/core/prisma/Cargo.toml
@@ -4,4 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust.git", branch = "0.6.0", features = ["rspc"] }
+prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust.git", rev = "6a0119bce951c8d956542a59b2f783fc5a591fc7", features = [
+ "rspc",
+ "sqlite-create-many",
+] }
From d10cf558bd0775c2add7619d765baff00a5d9858 Mon Sep 17 00:00:00 2001
From: Brendan Allan
Date: Sat, 20 Aug 2022 02:18:52 +0800
Subject: [PATCH 09/11] use ghost api v5 on landing
---
apps/landing/package.json | 102 +++++++++---------
apps/landing/src/pages/blog/api.ts | 52 ++++-----
.../src/pages/blog/post.page.server.ts | 26 ++---
3 files changed, 90 insertions(+), 90 deletions(-)
diff --git a/apps/landing/package.json b/apps/landing/package.json
index 4a5a08e58..d6e3ac3f1 100644
--- a/apps/landing/package.json
+++ b/apps/landing/package.json
@@ -1,53 +1,53 @@
{
- "name": "@sd/landing",
- "scripts": {
- "dev": "pnpm run server",
- "prod": "pnpm run build && pnpm run server:prod",
- "vercel-build": "./vercel/deploy.sh",
- "build": "vite build && vite build --ssr && vite-plugin-ssr prerender",
- "server": "ts-node ./server",
- "server:prod": "cross-env NODE_ENV=production ts-node ./server"
- },
- "dependencies": {
- "@heroicons/react": "^1.0.6",
- "@icons-pack/react-simple-icons": "^5.2.0",
- "@sd/interface": "link:../../packages/interface",
- "@sd/ui": "link:../../packages/ui",
- "@tryghost/content-api": "^1.11.0",
- "@types/compression": "^1.7.2",
- "@types/express": "^4.17.13",
- "@types/node": "^17.0.31",
- "@types/react": "^18.0.8",
- "@types/react-dom": "^18.0.3",
- "@vitejs/plugin-react": "^1.3.2",
- "clsx": "^1.2.1",
- "compression": "^1.7.4",
- "cross-env": "^7.0.3",
- "express": "^4.18.1",
- "phosphor-react": "^1.4.1",
- "prismjs": "^1.28.0",
- "react": "^18.1.0",
- "react-dom": "^18.1.0",
- "react-helmet": "^6.1.0",
- "react-hook-form": "^7.33.1",
- "react-tsparticles": "^2.1.3",
- "sirv": "^2.0.2",
- "ts-node": "^10.7.0",
- "tsparticles": "^2.1.3",
- "typescript": "^4.6.4",
- "vite": "^2.9.14",
- "vite-plugin-ssr": "^0.4.15"
- },
- "devDependencies": {
- "@tailwindcss/line-clamp": "^0.4.0",
- "@tailwindcss/typography": "^0.5.4",
- "@types/prismjs": "^1.26.0",
- "@types/react-helmet": "^6.1.5",
- "@types/tryghost__content-api": "^1.3.11",
- "postcss": "^8.4.14",
- "sass": "^1.54.0",
- "tailwind": "^4.0.0",
- "vite-plugin-markdown": "^2.0.2",
- "vite-plugin-svgr": "^2.2.1"
- }
+ "name": "@sd/landing",
+ "scripts": {
+ "dev": "pnpm run server",
+ "prod": "pnpm run build && pnpm run server:prod",
+ "vercel-build": "./vercel/deploy.sh",
+ "build": "vite build",
+ "server": "ts-node ./server",
+ "server:prod": "cross-env NODE_ENV=production ts-node ./server"
+ },
+ "dependencies": {
+ "@heroicons/react": "^1.0.6",
+ "@icons-pack/react-simple-icons": "^5.2.0",
+ "@sd/interface": "link:../../packages/interface",
+ "@sd/ui": "link:../../packages/ui",
+ "@tryghost/content-api": "^1.11.0",
+ "@types/compression": "^1.7.2",
+ "@types/express": "^4.17.13",
+ "@types/node": "^17.0.31",
+ "@types/react": "^18.0.8",
+ "@types/react-dom": "^18.0.3",
+ "@vitejs/plugin-react": "^1.3.2",
+ "clsx": "^1.2.1",
+ "compression": "^1.7.4",
+ "cross-env": "^7.0.3",
+ "express": "^4.18.1",
+ "phosphor-react": "^1.4.1",
+ "prismjs": "^1.28.0",
+ "react": "^18.1.0",
+ "react-dom": "^18.1.0",
+ "react-helmet": "^6.1.0",
+ "react-hook-form": "^7.33.1",
+ "react-tsparticles": "^2.1.3",
+ "sirv": "^2.0.2",
+ "ts-node": "^10.7.0",
+ "tsparticles": "^2.1.3",
+ "typescript": "^4.6.4",
+ "vite": "^2.9.14",
+ "vite-plugin-ssr": "^0.4.15"
+ },
+ "devDependencies": {
+ "@tailwindcss/line-clamp": "^0.4.0",
+ "@tailwindcss/typography": "^0.5.4",
+ "@types/prismjs": "^1.26.0",
+ "@types/react-helmet": "^6.1.5",
+ "@types/tryghost__content-api": "^1.3.11",
+ "postcss": "^8.4.14",
+ "sass": "^1.54.0",
+ "tailwind": "^4.0.0",
+ "vite-plugin-markdown": "^2.0.2",
+ "vite-plugin-svgr": "^2.2.1"
+ }
}
diff --git a/apps/landing/src/pages/blog/api.ts b/apps/landing/src/pages/blog/api.ts
index 03778da1e..64b298abf 100644
--- a/apps/landing/src/pages/blog/api.ts
+++ b/apps/landing/src/pages/blog/api.ts
@@ -7,35 +7,35 @@ const ghostURL = import.meta.env.VITE_API_URL;
export const blogEnabled = !!(ghostURL && ghostKey);
export const api = blogEnabled
- ? new GhostContentAPI({
- url: ghostURL,
- key: ghostKey,
- version: 'v4'
- })
- : null;
+ ? new GhostContentAPI({
+ url: ghostURL,
+ key: ghostKey,
+ version: 'v5.0'
+ })
+ : null;
export async function getPosts() {
- if (!api) {
- return [];
- }
- const posts = await api.posts
- .browse({
- include: ['tags', 'authors']
- })
- .catch(() => []);
- return posts;
+ if (!api) {
+ return [];
+ }
+ const posts = await api.posts
+ .browse({
+ include: ['tags', 'authors']
+ })
+ .catch(() => []);
+ return posts;
}
export async function getPost(slug: string) {
- if (!api) {
- return null;
- }
- return await api.posts
- .read(
- { slug },
- {
- include: ['tags', 'authors']
- }
- )
- .catch(() => null);
+ if (!api) {
+ return null;
+ }
+ return await api.posts
+ .read(
+ { slug },
+ {
+ include: ['tags', 'authors']
+ }
+ )
+ .catch(() => null);
}
diff --git a/apps/landing/src/pages/blog/post.page.server.ts b/apps/landing/src/pages/blog/post.page.server.ts
index 25d68151c..9f366b450 100644
--- a/apps/landing/src/pages/blog/post.page.server.ts
+++ b/apps/landing/src/pages/blog/post.page.server.ts
@@ -3,22 +3,22 @@ import { PageContextBuiltIn } from 'vite-plugin-ssr';
import { getPost, getPosts } from './api';
export async function onBeforeRender(pageContext: PageContextBuiltIn) {
- const post = await getPost(pageContext.routeParams['slug']);
+ const post = await getPost(pageContext.routeParams['slug']);
- return {
- pageContext: {
- pageProps: {
- post
- }
- }
- };
+ return {
+ pageContext: {
+ pageProps: {
+ post
+ }
+ }
+ };
}
export async function prerender() {
- const posts = await getPosts();
+ const posts = await getPosts();
- return posts.map((post) => ({
- url: `/blog/${post.slug}`,
- pageContext: { pageProps: { post } }
- }));
+ return posts.map((post) => ({
+ url: `/blog/${post.slug}`,
+ pageContext: { pageProps: { post } }
+ }));
}
From d54f4b1c373ed31ccee1cd3b6ab94557d21c0fbb Mon Sep 17 00:00:00 2001
From: Brendan Allan
Date: Sat, 20 Aug 2022 02:41:47 +0800
Subject: [PATCH 10/11] hide funding announcement as blog post isn't working
---
.../src/pages/blog/index.page.server.ts | 33 ++-
apps/landing/src/pages/blog/index.page.tsx | 104 +++----
.../src/pages/blog/post.page.server.ts | 9 -
apps/landing/src/pages/index.page.tsx | 256 +++++++++---------
4 files changed, 200 insertions(+), 202 deletions(-)
diff --git a/apps/landing/src/pages/blog/index.page.server.ts b/apps/landing/src/pages/blog/index.page.server.ts
index c92ae28dc..b2962ec40 100644
--- a/apps/landing/src/pages/blog/index.page.server.ts
+++ b/apps/landing/src/pages/blog/index.page.server.ts
@@ -1,22 +1,27 @@
-import { getPosts } from './api';
+import { blogEnabled, getPosts } from './api';
export async function onBeforeRender() {
- const posts = await getPosts();
+ const posts = await getPosts();
- return {
- pageContext: {
- pageProps: {
- posts
- }
- }
- };
+ return {
+ pageContext: {
+ pageProps: {
+ posts
+ }
+ }
+ };
}
export async function prerender() {
- const posts = await getPosts();
+ const posts = await getPosts();
- return {
- url: '/blog',
- pageContext: { pageProps: { posts } }
- };
+ const individualPosts = posts.map((post) => ({
+ url: `/blog/${post.slug}`,
+ pageContext: { pageProps: { post } }
+ }));
+
+ return [...individualPosts, {
+ url: '/blog',
+ pageContext: { pageProps: { posts } }
+ }];
}
diff --git a/apps/landing/src/pages/blog/index.page.tsx b/apps/landing/src/pages/blog/index.page.tsx
index 3a90b23c1..123a9e066 100644
--- a/apps/landing/src/pages/blog/index.page.tsx
+++ b/apps/landing/src/pages/blog/index.page.tsx
@@ -7,59 +7,59 @@ import { getWindow } from '../../utils';
import { blogEnabled } from './api';
function Page({ posts }: { posts: PostOrPage[] }) {
- if (!blogEnabled) {
- let window = getWindow();
- if (!window) return;
- window.location.href = '/blog-not-enabled';
- return <>>;
- }
+ if (!blogEnabled) {
+ let window = getWindow();
+ if (!window) return;
+ window.location.href = '/blog-not-enabled';
+ return <>>;
+ }
- return (
-
-
- Spacedrive Blog
-
-
-
- Blog
- Get the latest from Spacedrive.
-
-
- {posts.map((post) => {
- return (
- {
- window.location.href = `/blog/${post.slug}`;
- }}
- className="relative z-0 flex flex-col gap-2 mb-8 overflow-hidden transition-colors border border-gray-500 cursor-pointer rounded-xl"
- >
- {post.feature_image && (
-

- )}
-
-
{post.title}
-
{post.reading_time} minute read.
-
{post.excerpt}
-
- by {post.primary_author?.name} ·{' '}
- {new Date(post.published_at ?? '').toLocaleDateString()}
-
-
- {post.tags?.map((tag: Tag) => {
- return ;
- })}
-
-
-
- );
- })}
-
-
- );
+ return (
+
+
+ Spacedrive Blog
+
+
+
+ Blog
+ Get the latest from Spacedrive.
+
+
+ {posts.map((post) => {
+ return (
+ {
+ window.location.href = `/blog/${post.slug}`;
+ }}
+ className="relative z-0 flex flex-col gap-2 mb-8 overflow-hidden transition-colors border border-gray-500 cursor-pointer rounded-xl"
+ >
+ {post.feature_image && (
+

+ )}
+
+
{post.title}
+
{post.reading_time} minute read.
+
{post.excerpt}
+
+ by {post.primary_author?.name} ·{' '}
+ {new Date(post.published_at ?? '').toLocaleDateString()}
+
+
+ {post.tags?.map((tag: Tag) => {
+ return ;
+ })}
+
+
+
+ );
+ })}
+
+
+ );
}
export { Page };
diff --git a/apps/landing/src/pages/blog/post.page.server.ts b/apps/landing/src/pages/blog/post.page.server.ts
index 9f366b450..73d5a08a2 100644
--- a/apps/landing/src/pages/blog/post.page.server.ts
+++ b/apps/landing/src/pages/blog/post.page.server.ts
@@ -13,12 +13,3 @@ export async function onBeforeRender(pageContext: PageContextBuiltIn) {
}
};
}
-
-export async function prerender() {
- const posts = await getPosts();
-
- return posts.map((post) => ({
- url: `/blog/${post.slug}`,
- pageContext: { pageProps: { post } }
- }));
-}
diff --git a/apps/landing/src/pages/index.page.tsx b/apps/landing/src/pages/index.page.tsx
index d4c39fa7f..dbd90e136 100644
--- a/apps/landing/src/pages/index.page.tsx
+++ b/apps/landing/src/pages/index.page.tsx
@@ -12,147 +12,149 @@ import { usePageContext } from '../renderer/usePageContext';
import { getWindow } from '../utils';
interface SectionProps {
- orientation: 'left' | 'right';
- heading?: string;
- description?: string | React.ReactNode;
- children?: React.ReactNode;
- className?: string;
+ orientation: 'left' | 'right';
+ heading?: string;
+ description?: string | React.ReactNode;
+ children?: React.ReactNode;
+ className?: string;
}
function Section(props: SectionProps = { orientation: 'left' }) {
- let info = (
-
- {props.heading &&
{props.heading}
}
- {props.description && (
-
{props.description}
- )}
-
- );
- return (
-
- {props.orientation === 'right' ? (
- <>
- {info}
- {props.children}
- >
- ) : (
- <>
- {props.children}
- {info}
- >
- )}
-
- );
+ let info = (
+
+ {props.heading &&
{props.heading}
}
+ {props.description && (
+
{props.description}
+ )}
+
+ );
+ return (
+
+ {props.orientation === 'right' ? (
+ <>
+ {info}
+ {props.children}
+ >
+ ) : (
+ <>
+ {props.children}
+ {info}
+ >
+ )}
+
+ );
}
function Page() {
- const { urlParsed } = usePageContext();
- const [unsubscribedFromWaitlist, setUnsubscribedFromWaitlist] = useState(false);
+ const { urlParsed } = usePageContext();
+ const [unsubscribedFromWaitlist, setUnsubscribedFromWaitlist] = useState(false);
- useEffect(() => {
- if (!getWindow()) return;
+ useEffect(() => {
+ if (!getWindow()) return;
- const cuid = urlParsed.search?.['wunsub'];
- if (!cuid) return;
+ const cuid = urlParsed.search?.['wunsub'];
+ if (!cuid) return;
- (async () => {
- const prod = import.meta.env.PROD;
- const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
+ (async () => {
+ const prod = import.meta.env.PROD;
+ const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
- const req = await fetch(`${url}/api/waitlist?i=${cuid}`, {
- method: 'DELETE'
- });
+ const req = await fetch(`${url}/api/waitlist?i=${cuid}`, {
+ method: 'DELETE'
+ });
- if (req.status === 200) {
- setUnsubscribedFromWaitlist(true);
- window.history.replaceState(
- {},
- '',
- prod ? 'https://spacedrive.com' : 'http://localhost:8003'
- );
+ if (req.status === 200) {
+ setUnsubscribedFromWaitlist(true);
+ window.history.replaceState(
+ {},
+ '',
+ prod ? 'https://spacedrive.com' : 'http://localhost:8003'
+ );
- setTimeout(() => {
- setUnsubscribedFromWaitlist(false);
- }, 5000);
- } else if (req.status >= 400 && req.status < 500) {
- alert('An error occurred while unsubscribing from waitlist');
- }
- })();
- }, []);
+ setTimeout(() => {
+ setUnsubscribedFromWaitlist(false);
+ }, 5000);
+ } else if (req.status >= 400 && req.status < 500) {
+ alert('An error occurred while unsubscribing from waitlist');
+ }
+ })();
+ }, []);
- return (
- <>
-
- Spacedrive — A file manager from the future.
-
-
-
-
-
-
-
-
- {unsubscribedFromWaitlist && (
-
-
-
You have been unsubscribed from the waitlist
-
- )}
+ return (
+ <>
+
+ Spacedrive — A file manager from the future.
+
+
+
+
+
+
+
+ // Disabled while blog post is not available
+ // TODO: re-enable
+ {/* */}
+ {unsubscribedFromWaitlist && (
+
+
+
You have been unsubscribed from the waitlist
+
+ )}
-
- A file explorer from the future.
-
-
- Combine your drives and clouds into one database that you can organize and explore from any
- device.
-
-
- Designed for creators, hoarders and the painfully disorganized.
-
-
-
-
-
- Spacedrive accounts for every file you own, uniquely fingerprinting and extracting
- metadata so you can sort, tag, backup and share files without limitations of any one
- cloud provider.
-
-
-
- Find out more →
-
- >
- }
- />
-
- >
- );
+
+ A file explorer from the future.
+
+
+ Combine your drives and clouds into one database that you can organize and explore from any
+ device.
+
+
+ Designed for creators, hoarders and the painfully disorganized.
+
+
+
+
+
+ Spacedrive accounts for every file you own, uniquely fingerprinting and extracting
+ metadata so you can sort, tag, backup and share files without limitations of any one
+ cloud provider.
+
+
+
+ Find out more →
+
+ >
+ }
+ />
+
+ >
+ );
}
export { Page };
From 1d158d0d7d0eeafc5dca8aa88fe8915c83f4b1d2 Mon Sep 17 00:00:00 2001
From: Brendan Allan
Date: Sat, 20 Aug 2022 02:48:07 +0800
Subject: [PATCH 11/11] brenan is stupid
---
apps/landing/src/pages/index.page.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/landing/src/pages/index.page.tsx b/apps/landing/src/pages/index.page.tsx
index dbd90e136..a702c9815 100644
--- a/apps/landing/src/pages/index.page.tsx
+++ b/apps/landing/src/pages/index.page.tsx
@@ -100,8 +100,8 @@ function Page() {
- // Disabled while blog post is not available
- // TODO: re-enable
+ {/* Disabled while blog post is not available */}
+ {/* TODO: re-enable */}
{/*