Skip to content

Commit

Permalink
Modify logs
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Oct 18, 2023
1 parent 85ae7ea commit 3adc9c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/example-ssr/src/pages/ContactPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {transitionsHelper} from "~/helpers/transitionsHelper"
const componentName = "ContactPage"
function ContactPage(props, handleRef) {
const rootRef = useRef(null)

useStack({
componentName,
handleRef,
Expand Down
15 changes: 2 additions & 13 deletions src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,9 @@ function Router(props: {
const cache = staticPropsCache();

// check if new route data as been store in cache
// the matcher will match even if the URL ends with a slash,
// so we need to remove it to get the right cache key and initialStaticPropsUrl
// prettier-ignore
const initialStaticPropsUrl = removeLastCharFromString(props.initialStaticProps?.url, "/");
// remove hash from initialStaticPropsUrl and keep it
// the matcher will match even if the URL ends with a slash
const fullUrl = removeLastCharFromString(newRoute._fullUrl, "/");
const [urlWithoutHash, urlHash] = fullUrl.split("#");

log(props.id, {
isFirstRoute: Routers.isFirstRoute,
initialStaticPropsUrl,
urlWithoutHash,
urlHash,
});
const [urlWithoutHash] = fullUrl.split("#");

/**
* Request static props and cache it
Expand Down

0 comments on commit 3adc9c1

Please sign in to comment.