@bbki.ng/site 5.4.30 → 5.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @bbki.ng/site
|
|
2
2
|
|
|
3
|
+
## 5.4.32
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3308d28: fix layout
|
|
8
|
+
- Updated dependencies [3308d28]
|
|
9
|
+
- @bbki.ng/ui@0.1.6
|
|
10
|
+
|
|
11
|
+
## 5.4.31
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 25738cb: fix: cors error
|
|
16
|
+
- Updated dependencies [25738cb]
|
|
17
|
+
- @bbki.ng/ui@0.1.5
|
|
18
|
+
|
|
3
19
|
## 5.4.30
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/site",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.32",
|
|
4
4
|
"description": "code behind bbki.ng",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"react-dom": "^18.0.0",
|
|
15
15
|
"react-router-dom": "6",
|
|
16
16
|
"swr": "^2.2.5",
|
|
17
|
-
"@bbki.ng/ui": "0.1.
|
|
17
|
+
"@bbki.ng/ui": "0.1.6"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@eslint/compat": "^1.0.0",
|
package/src/blog/app.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { Outlet, Route, Routes } from 'react-router-dom';
|
|
3
3
|
import { Cover, Streaming } from './pages';
|
|
4
|
-
import { Nav, NotFound, Page, Grid, ErrorBoundary } from '@bbki.ng/ui';
|
|
4
|
+
import { Nav, NotFound, Page, Grid, ErrorBoundary, Container } from '@bbki.ng/ui';
|
|
5
5
|
|
|
6
6
|
import ArticlePage from '@/pages/extensions/txt/article';
|
|
7
7
|
import Txt from '@/pages/extensions/txt';
|
|
@@ -30,9 +30,11 @@ const Layout = () => {
|
|
|
30
30
|
}
|
|
31
31
|
main={
|
|
32
32
|
<Grid leftAside={<div />} rightAside={<div />}>
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
33
|
+
<Container className="py-32">
|
|
34
|
+
<ErrorBoundary>
|
|
35
|
+
<Outlet />
|
|
36
|
+
</ErrorBoundary>
|
|
37
|
+
</Container>
|
|
36
38
|
</Grid>
|
|
37
39
|
}
|
|
38
40
|
/>
|
|
@@ -30,7 +30,7 @@ export const ArticlePage = (props: ArticlePageProps) => {
|
|
|
30
30
|
title={title}
|
|
31
31
|
date={props.date}
|
|
32
32
|
description={description}
|
|
33
|
-
className={`${props.className || ''}
|
|
33
|
+
className={`${props.className || ''}`}
|
|
34
34
|
loading={false}
|
|
35
35
|
>
|
|
36
36
|
<article className={articleCls}>{props.children}</article>
|
|
@@ -38,7 +38,7 @@ export const ArticlePage = (props: ArticlePageProps) => {
|
|
|
38
38
|
<Reaction title={title} url={window.location.href} />
|
|
39
39
|
</div>*/}
|
|
40
40
|
</Article>
|
|
41
|
-
<div className="
|
|
41
|
+
<div className="">
|
|
42
42
|
<Button
|
|
43
43
|
className=""
|
|
44
44
|
type="button"
|
|
@@ -6,7 +6,8 @@ import { useContext, useEffect, useState, useCallback } from 'react';
|
|
|
6
6
|
import { GlobalLoadingContext } from '@/context/global_loading_state_provider';
|
|
7
7
|
|
|
8
8
|
// In dev, use /api prefix to leverage Vite proxy to localhost:8787
|
|
9
|
-
const isProd = typeof window !== 'undefined' && /^https:\/\/bbki.ng/.test(window.location.href);
|
|
9
|
+
// const isProd = typeof window !== 'undefined' && /^https:\/\/bbki.ng/.test(window.location.href);
|
|
10
|
+
const isProd = true;
|
|
10
11
|
const API_BASE = !isProd ? '/api' : API_ENDPOINT;
|
|
11
12
|
|
|
12
13
|
export type StreamingItem = {
|
package/src/blog/utils/index.ts
CHANGED
|
@@ -8,7 +8,11 @@ export const floatNumberToPercentageString = (num: number): string => {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export const baseFetcher = (resource: string, init: RequestInit = {}) =>
|
|
11
|
-
|
|
11
|
+
// enable cors
|
|
12
|
+
fetch(resource, {
|
|
13
|
+
...init,
|
|
14
|
+
mode: 'cors',
|
|
15
|
+
}).then(res => {
|
|
12
16
|
if (!res.ok) {
|
|
13
17
|
throw new Error('An error occurred while fetching the data.');
|
|
14
18
|
}
|