Skip to content

Commit

Permalink
Remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
pierregradelet committed Sep 26, 2024
1 parent ca53ae1 commit 91f9924
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
7 changes: 0 additions & 7 deletions src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ function Router(
return
}

console.log("========> handleHistory", url)

const matchingRoute = getRouteFromUrl({
pUrl: url,
pRoutes: routes,
Expand All @@ -309,17 +307,13 @@ function Router(
const newRoute: TRoute = matchingRoute || notFoundRoute
if (!newRoute) return

console.log("===================== newRoute _fullUrl", newRoute._fullUrl)

// prepare cache for new route data staticProps
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
const fullUrl = removeLastCharFromString(newRoute._fullUrl, "/")
console.log("===================== newRoute fullUrl", fullUrl)
const [urlWithoutHash] = fullUrl.split("#")
console.log("===================== newRoute urlWithoutHash", urlWithoutHash)

/**
* Request static props and cache it
Expand Down Expand Up @@ -353,7 +347,6 @@ function Router(
if (props.initialStaticProps) {
log(props.id, "firstRoute > isClient > assign initialStaticProps to newRoute props & set cache");
Object.assign(newRoute.props, props.initialStaticProps?.props ?? {});
console.log("===================== urlWithoutHash", urlWithoutHash)
cache.set(urlWithoutHash, newRoute.props ?? {});
}
else if (newRoute.getStaticProps) {
Expand Down
3 changes: 0 additions & 3 deletions src/core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ export function getRouteFromUrl({
isHashHistory,
)

console.log("======getRouteFromUrl queryParams", queryParams)

function next({
pUrl,
urlWithoutHashAndQuery,
Expand Down Expand Up @@ -404,7 +402,6 @@ export const extractQueryParamsAndHash = (
return params
}

console.log(" ===========> extractQueryParamsAndHash", url)
let queryParams = {}
let hash = null
let newUrl = url
Expand Down

0 comments on commit 91f9924

Please sign in to comment.