feat: misc cleanups
This commit is contained in:
parent
2c617c21c7
commit
255563f267
4 changed files with 21 additions and 10 deletions
|
|
@ -39,7 +39,13 @@ const getTopicColor = (topicName) => {
|
|||
return "#d50032";
|
||||
case "algorithms":
|
||||
return "#6a0dad";
|
||||
default:
|
||||
return "#000000";
|
||||
}
|
||||
};
|
||||
|
||||
const urlToTopic = () => window.location.pathname.split("/")[2];
|
||||
const urlToTopic = () => {
|
||||
const pathname = window.location.pathname.split("/");
|
||||
if (pathname.length < 3) return "DNE";
|
||||
return pathname[2];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue