-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
74 lines (51 loc) · 1.48 KB
/
main.js
File metadata and controls
74 lines (51 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import './style.css'
import { templateColor } from './components/color-mode';
import { changeTheme } from './components/color-mode';
import { printDashboard } from './pages/Dashboard/Dashboard';
import { printPokedex } from './pages/Pokedex/Pokedex';
import { printLogin } from './pages/Login/Login';
import { playHub, printPlayHubBtn } from './components/PlayHub/PlayHub';
import { templatePlayHubBtn } from './components/PlayHub/PlayHub';
const header = document.querySelector("header");
header.innerHTML = templateColor();
changeTheme();
//header.innerHTML += templatePlayHubBtn();
//playHub()
export const initContent = (route) => {
switch (route) {
/*case undefined:
HomeTemplate();
break;*/
case "Login":
printLogin();
break;
case "Dashboard":
printDashboard();
break;
case "Pokedex":
printPokedex();
//printPlayHubBtn();
break;
case "MemoryGame":
printMemoryGame();
break;
}};
//initContent("Login");
if (localStorage.getItem("UserName")){
initContent("Dashboard")}
else {initContent("Login")};
/*export const initContent = (route) => {
switch (route) {
case "Login":
console.log ("Vamo a veh! Login")
break;
case "Dashboard":
console.log ("Vamo a veh! Login")
break;
}
}*/
/*if(localStorage.getItem.length < 0){
header.innerHTML = Login();}
else{
header.innerHTML = dashboardTemplate
}*/