Skip to content

Commit 9c9f1bb

Browse files
committed
get rid of blogs
1 parent d021eee commit 9c9f1bb

File tree

7 files changed

+711
-469
lines changed

7 files changed

+711
-469
lines changed

next.config.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
const nextConfig = {
33
reactStrictMode: false,
44
images: {
5+
unoptimized: true,
56
remotePatterns: [
67
{
7-
protocol: "https",
8-
hostname: "**",
9-
},
10-
],
8+
protocol: 'https',
9+
hostname: '**'
10+
}
11+
]
1112
}
12-
}
13+
};
1314

14-
module.exports = nextConfig
15+
module.exports = nextConfig;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"lint": "next lint",
1010
"format": "prettier --write ./src",
1111
"postbuild": "next-sitemap",
12-
"prepare": "husky"
12+
"prepare": "husky",
13+
"export": "next export"
1314
},
1415
"dependencies": {
1516
"@chakra-ui/icons": "^2.0.18",

public/sitemap-0.xml

Lines changed: 690 additions & 453 deletions
Large diffs are not rendered by default.

src/lib/firebase.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export const workFlowColRef = collection(firebase.firebaseStore, 'workflow');
6666
export const discussionSubColName = 'participants';
6767
export const electionColRef = collection(firebase.firebaseStore, 'election');
6868
export const newsLetterColRef = collection(firebase.firebaseStore, 'news_letter');
69+
export const affiliatesColRef = collection(firebase.firebaseStore, 'affiliates');
6970

7071
///
7172
/// firebase storage

src/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function App({ Component, pageProps }: AppProps) {
7373
</Flex> */}
7474

7575
<PalestineSupportBanner hideMessage={!footerPages.includes(router.pathname)} />
76-
{/* <PastPaperToast /> */}
76+
<PastPaperToast />
7777

7878
{/* {!excludeHeadPages.includes(router.pathname) && (
7979
<NewFeature

src/pages/blogs/[id].tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ interface Post {
1414
}
1515

1616
export const getStaticPaths = (async () => {
17-
const res = await fetch('https://sneakword.online/wp-json/wp/v2/posts?_fields=id');
18-
const posts = await res.json();
19-
const paths = posts.map((post: any) => ({
17+
// const res = await fetch('https://sneakword.online/wp-json/wp/v2/posts?_fields=id');
18+
// const posts = await res.json();
19+
20+
const paths = [].map((post: any) => ({
2021
params: { id: post.id + '' }
2122
}));
2223

@@ -28,10 +29,10 @@ export const getStaticPaths = (async () => {
2829

2930
export const getStaticProps = (async (context: GetStaticPropsContext) => {
3031
const id = context.params!.id;
31-
const res = await fetch(`https://sneakword.online/wp-json/wp/v2/posts/${id}`);
32-
const post = (await res.json()) as Post | undefined;
32+
// const res = await fetch(`https://sneakword.online/wp-json/wp/v2/posts/${id}`);
33+
// const post = (await res.json()) as Post | undefined;
3334
return {
34-
props: { post: post },
35+
props: { post: undefined },
3536
revalidate: 60 * 60 * 12
3637
};
3738
}) satisfies GetStaticProps<{

src/pages/blogs/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ type Posts = {
1111
}[];
1212

1313
export const getStaticProps = (async (context) => {
14-
const res = await fetch('https://sneakword.online/wp-json/wp/v2/posts?_fields=title,id');
15-
const posts = (await res.json()) as Posts;
14+
// const res = await fetch('https://sneakword.online/wp-json/wp/v2/posts?_fields=title,id');
15+
// const posts = (await res.json()) as Posts;
16+
const posts = [] as Posts;
1617
return { props: { posts }, revalidate: 60 * 60 * 12 };
1718
}) satisfies GetStaticProps<{
1819
posts: Posts;

0 commit comments

Comments
 (0)