@basicbenframework/create 0.1.8 → 0.1.10
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/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react'
|
|
1
2
|
import { useAuth, useNavigate } from '@basicbenframework/core/client'
|
|
2
3
|
import { useTheme } from '../components/ThemeContext'
|
|
3
4
|
import { Card } from '../components/Card'
|
|
@@ -9,6 +10,14 @@ export function Home() {
|
|
|
9
10
|
const { user } = useAuth()
|
|
10
11
|
const navigate = useNavigate()
|
|
11
12
|
const { t, dark } = useTheme()
|
|
13
|
+
const [version, setVersion] = useState(null)
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
fetch('https://registry.npmjs.org/@basicbenframework/core/latest')
|
|
17
|
+
.then(res => res.json())
|
|
18
|
+
.then(data => setVersion(data.version))
|
|
19
|
+
.catch(() => {})
|
|
20
|
+
}, [])
|
|
12
21
|
|
|
13
22
|
const features = [
|
|
14
23
|
{
|
|
@@ -197,9 +206,9 @@ export default (router) => {
|
|
|
197
206
|
)}
|
|
198
207
|
|
|
199
208
|
{/* Footer */}
|
|
200
|
-
<footer className={`text-center text-xs ${t.subtle} space-y-
|
|
209
|
+
<footer className={`text-center text-xs ${t.subtle} space-y-1`}>
|
|
201
210
|
<p>Built with Node.js built-ins. Inspired by Laravel.</p>
|
|
202
|
-
<p>BasicBen
|
|
211
|
+
{version && <p>BasicBen v{version}</p>}
|
|
203
212
|
</footer>
|
|
204
213
|
</div>
|
|
205
214
|
)
|