Skip to content

Commit 8cf312b

Browse files
committed
Remove snack links from 8.x docs
1 parent eaa7160 commit 8cf312b

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

src/components/Pre.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ export default function Pre({
103103
);
104104
}
105105

106+
const version = activeVersion?.name;
107+
106108
// Handle snack demos
107-
if (snack) {
109+
if (snack && versions[version] != null) {
108110
const code = child.props.children;
109111

110112
if (typeof code !== 'string') {
@@ -131,12 +133,6 @@ export default function Pre({
131133
)
132134
: {};
133135

134-
const version = activeVersion?.name;
135-
136-
if (version == null || versions[version] == null) {
137-
throw new Error(`Invalid version: ${version}`);
138-
}
139-
140136
Object.assign(
141137
dependencies,
142138
Object.entries(versions[version]).reduce((acc, [key, value]) => {

src/plugins/react-navigation-versions.mjs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,6 @@ export default function reactNavigationVersionsPlugin(context, options) {
3434
name: 'react-navigation-versions',
3535
async contentLoaded({ content, actions }) {
3636
const queries = {
37-
'8.x': {
38-
tag: 'next',
39-
packages: [
40-
'@react-navigation/bottom-tabs',
41-
'@react-navigation/core',
42-
'@react-navigation/drawer',
43-
'@react-navigation/elements',
44-
'@react-navigation/material-top-tabs',
45-
'@react-navigation/native-stack',
46-
'@react-navigation/native',
47-
'@react-navigation/routers',
48-
'@react-navigation/stack',
49-
'react-native-drawer-layout',
50-
'react-native-tab-view',
51-
],
52-
},
5337
'7.x': {
5438
tag: 'latest',
5539
packages: [

0 commit comments

Comments
 (0)