Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW-5837 Add leading slash to separate query params from path #3301

Merged
merged 6 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/KnowledgeBaseLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import strings from 'src/strings';
export default function KnowledgeBaseLink(): JSX.Element {
const theme = useTheme();
const knowledgeBaseLinks = useKnowledgeBaseLinks();
const [currentLink, setCurrentLink] = useState(knowledgeBaseLinks.home);
const [currentLink, setCurrentLink] = useState(knowledgeBaseLinks['/home']);
const location = useLocation();

const onClick = () => {
window.open(currentLink, '_blank');
};

useEffect(() => {
setCurrentLink(knowledgeBaseLinks.home);
setCurrentLink(knowledgeBaseLinks['/home']);
for (const key in knowledgeBaseLinks) {
if ((location.pathname + location.search).match(key)) {
setCurrentLink(knowledgeBaseLinks[key as keyof typeof KnowledgeBaseLink]);
Expand Down
Loading