-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docs link, test fixing relative URLs in Windows (#606)
* Fix #593: don't prevent default on link click * Use absolute/explicit path for settings Trying to test fix for #594 * Broken: replace almost all relative URLs with absolute * add relative jump backs util * dot dot slash everywhere * use usLocation not window.location * the one that got away * fmt 🤦♂️ --------- Co-authored-by: Kurt Hutten Irev-Dev <[email protected]>
- Loading branch information
1 parent
8147f5f
commit 488e41a
Showing
19 changed files
with
117 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { useLocation } from 'react-router-dom' | ||
|
||
export function useDotDotSlash(): (count?: number) => string { | ||
const location = useLocation() | ||
const dotDotSlash = (count = 1): string => { | ||
// since we can't use relative paths (../) for windows | ||
if (location.pathname === '/') return '' | ||
const path = location.pathname.slice(0, location.pathname.lastIndexOf('/')) | ||
if (count <= 1) return path | ||
return dotDotSlash(count - 1) | ||
} | ||
return dotDotSlash | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
488e41a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
modeling-app – ./
untitled-app.kittycad.io
app.kittycad.io
modeling-app-kittycad.vercel.app
untitled-lang.vercel.app
modeling-app-git-main-kittycad.vercel.app