Skip to content

Commit

Permalink
fix: fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
osdnk committed Oct 1, 2023
1 parent ddd694b commit 566a609
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
33 changes: 14 additions & 19 deletions example/src/LinkingPlayground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,27 @@ const SignInScreen = ({ signIn }: any) => {
const Stack = createStackNavigator();
const OuterStack = createStackNavigator();

const config = {
screens: {
Outer: {
path: 'outer',
screens: {
Home: 'home',
Details: {
path: 'details/:message',
parse: {
message: (message: string) => `${message}`,
const linking = {
prefixes: [createURL('/')],
config: {
screens: {
Outer: {
path: 'outer',
screens: {
Home: 'home',
Details: {
path: 'details/:message',
parse: {
message: (message: string) => `${message}`,
},
},
Profile: 'profile',
},
Profile: 'profile',
},
},
},
};

const linking = {
prefixes: [createURL('/')],
config,
// async getInitialURL() {
// return `${createURL('/')}profile`;
// },
};

export function LinkingPlayground() {
const [isSignedIn, setSignedIn] = React.useState(false);
return (
Expand Down
2 changes: 0 additions & 2 deletions packages/native/src/useDeferredLinking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ export function useDeferredLinking() {
state = state.routes[0].state;

Check warning on line 62 in packages/native/src/useDeferredLinking.tsx

View check run for this annotation

Codecov / codecov/patch

packages/native/src/useDeferredLinking.tsx#L62

Added line #L62 was not covered by tests
}
if (!state) {
// error?
return;

Check warning on line 65 in packages/native/src/useDeferredLinking.tsx

View check run for this annotation

Codecov / codecov/patch

packages/native/src/useDeferredLinking.tsx#L65

Added line #L65 was not covered by tests
}
const innerState = state.routes[0].state;
if (!innerState) {
// error?
return;

Check warning on line 69 in packages/native/src/useDeferredLinking.tsx

View check run for this annotation

Codecov / codecov/patch

packages/native/src/useDeferredLinking.tsx#L69

Added line #L69 was not covered by tests
}
rootState = innerState;
Expand Down

0 comments on commit 566a609

Please sign in to comment.