File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,15 @@ import {
8
8
ScrollRestoration ,
9
9
useLoaderData ,
10
10
} from '@remix-run/react' ;
11
+ import { getLatestVersion } from 'fast-npm-meta' ;
11
12
12
13
// Styles:
13
14
import stylesheet from '@/styles/globals.css?url' ;
14
15
import { cn } from './utils' ;
15
16
16
17
// Layout:
17
18
import Header from './components/header' ;
18
- import SidebarContent from './components/sidebar' ;
19
+ import SidebarContent from './components/sidebar/sidebar ' ;
19
20
import { proseClasses } from './ui/prose' ;
20
21
21
22
// Providers:
@@ -40,8 +41,10 @@ export const links: LinksFunction = () => [
40
41
41
42
export async function loader ( { request } : LoaderFunctionArgs ) {
42
43
const { getTheme } = await themeSessionResolver ( request ) ;
44
+ const metadata = await getLatestVersion ( '@pheralb/toast' ) ;
43
45
return {
44
46
theme : getTheme ( ) ,
47
+ npmVersion : metadata . version ,
45
48
} ;
46
49
}
47
50
@@ -82,7 +85,7 @@ function App() {
82
85
< Header />
83
86
< main className = "container w-full max-w-7xl" >
84
87
< aside className = "hidden md:block" >
85
- < SidebarContent />
88
+ < SidebarContent npmVersion = { data . npmVersion ! } />
86
89
</ aside >
87
90
< MDXProvider disableParentContext components = { mdxComponents } >
88
91
< article
You can’t perform that action at this time.
0 commit comments