parent
b80ed99d6c
commit
9c06545931
@ -1,7 +1,7 @@
|
|||||||
export default function Header() {
|
export default function Header() {
|
||||||
return (
|
return (
|
||||||
<div className="header">
|
<div className="header">
|
||||||
<h1>owltier</h1>
|
<h1>owltier.com</h1>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
const ListDefaults = {
|
||||||
|
na: [
|
||||||
|
"Boston Uprising",
|
||||||
|
"San Francisco Shock",
|
||||||
|
"Houston Outlaws",
|
||||||
|
"Los Angeles Gladiators",
|
||||||
|
"New York Excelsior",
|
||||||
|
"Washington Justice",
|
||||||
|
"Vegas Eternal",
|
||||||
|
"Toronto Defiant",
|
||||||
|
"Atlanta Reign",
|
||||||
|
"Florida Mayhem",
|
||||||
|
"London Spitfire",
|
||||||
|
"Los Angeles Valiant",
|
||||||
|
"Vancouver Titans"
|
||||||
|
],
|
||||||
|
apac: [
|
||||||
|
"Dallas Fuel",
|
||||||
|
"Seoul Infernal",
|
||||||
|
"Guangzhou Charge",
|
||||||
|
"Hangzhou Spark",
|
||||||
|
"Shanghai Dragons",
|
||||||
|
"Seoul Dynasty",
|
||||||
|
// "Chengdu Hunterss"
|
||||||
|
],
|
||||||
|
}
|
||||||
|
export default ListDefaults
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
export function getCookie(name: string): string|null {
|
||||||
|
const nameLenPlus = (name.length + 1);
|
||||||
|
return document.cookie
|
||||||
|
.split(';')
|
||||||
|
.map(c => c.trim())
|
||||||
|
.filter(cookie => {
|
||||||
|
return cookie.substring(0, nameLenPlus) === `${name}=`;
|
||||||
|
})
|
||||||
|
.map(cookie => {
|
||||||
|
return decodeURIComponent(cookie.substring(nameLenPlus));
|
||||||
|
})[0] || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setCookie(name: string, val: string) {
|
||||||
|
const date = new Date();
|
||||||
|
const value = val;
|
||||||
|
|
||||||
|
// Set it expire in 7 days
|
||||||
|
date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000));
|
||||||
|
|
||||||
|
// Set it
|
||||||
|
document.cookie = name+"="+value+"; expires="+date.toUTCString()+"; path=/";
|
||||||
|
}
|
||||||
Loading…
Reference in new issue