feat: rename class styles, improve js idiomacy
This commit is contained in:
parent
707afe91fa
commit
cae425da1a
9 changed files with 12 additions and 14 deletions
|
|
@ -29,7 +29,7 @@ function goHome(e) {
|
|||
clearPrompt(500, () => (window.location.href = "/"));
|
||||
}
|
||||
|
||||
function getTopicColor(topicName) {
|
||||
const getTopicColor = (topicName) => {
|
||||
switch (topicName) {
|
||||
case "software":
|
||||
return "#0073e6";
|
||||
|
|
@ -40,4 +40,6 @@ function getTopicColor(topicName) {
|
|||
case "algorithms":
|
||||
return "#6a0dad";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const urlToTopic = () => window.location.pathname.split("/")[2];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue