mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-09 00:42:47 +00:00
feat: add new realms
This commit is contained in:
@@ -12,6 +12,7 @@ interface Props extends RouteComponentProps<any> {}
|
|||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
realms: CategoryModel[];
|
realms: CategoryModel[];
|
||||||
|
classicRealms: CategoryModel[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Realms extends React.Component<Props, State> {
|
export class Realms extends React.Component<Props, State> {
|
||||||
@@ -20,6 +21,7 @@ export class Realms extends React.Component<Props, State> {
|
|||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
realms: [],
|
realms: [],
|
||||||
|
classicRealms: [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +33,11 @@ export class Realms extends React.Component<Props, State> {
|
|||||||
.filter({ category: 'realm' })
|
.filter({ category: 'realm' })
|
||||||
.orderBy(['title'])
|
.orderBy(['title'])
|
||||||
.value() as CategoryModel[];
|
.value() as CategoryModel[];
|
||||||
this.setState({ realms });
|
const classicRealms = chain(res)
|
||||||
|
.filter({ category: 'classic_realm' })
|
||||||
|
.orderBy(['title'])
|
||||||
|
.value() as CategoryModel[];
|
||||||
|
this.setState({ realms, classicRealms });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
@@ -74,6 +80,14 @@ export class Realms extends React.Component<Props, State> {
|
|||||||
<div>Use these forums to discuss topics related to World of Warcraft with players on your own Realm.</div>
|
<div>Use these forums to discuss topics related to World of Warcraft with players on your own Realm.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h1>Classic Realms</h1>
|
||||||
|
|
||||||
|
<ul className="realm-column">
|
||||||
|
{this.renderRealms(this.state.classicRealms)}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1>Legacy Realms</h1>
|
||||||
|
|
||||||
<div className="flex flex--wrap">
|
<div className="flex flex--wrap">
|
||||||
<ul className="realm-column">
|
<ul className="realm-column">
|
||||||
{this.renderRealms(list1)}
|
{this.renderRealms(list1)}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use Mix.Config
|
|||||||
# with brunch.io to recompile .js and .css sources.
|
# with brunch.io to recompile .js and .css sources.
|
||||||
config :myapp, MyAppWeb.Endpoint,
|
config :myapp, MyAppWeb.Endpoint,
|
||||||
host: "0.0.0.0",
|
host: "0.0.0.0",
|
||||||
http: [port: 8080],
|
http: [port: 5035],
|
||||||
debug_errors: true,
|
debug_errors: true,
|
||||||
code_reloader: true,
|
code_reloader: true,
|
||||||
check_origin: false,
|
check_origin: false,
|
||||||
|
|||||||
@@ -163,6 +163,26 @@ defmodule Category do
|
|||||||
# additional realms
|
# additional realms
|
||||||
%{"id" => 143, "category" => "realm", "title" => "Sentinels"},
|
%{"id" => 143, "category" => "realm", "title" => "Sentinels"},
|
||||||
%{"id" => 144, "category" => "realm", "title" => "Vek'nilash"},
|
%{"id" => 144, "category" => "realm", "title" => "Vek'nilash"},
|
||||||
|
|
||||||
|
# classic realms
|
||||||
|
%{"id" => 145, "category" => "classic_realm", "title" => "Atiesh"},
|
||||||
|
%{"id" => 146, "category" => "classic_realm", "title" => "Mankrik"},
|
||||||
|
%{"id" => 147, "category" => "classic_realm", "title" => "Myzrael"},
|
||||||
|
%{"id" => 148, "category" => "classic_realm", "title" => "Pagle"},
|
||||||
|
%{"id" => 149, "category" => "classic_realm", "title" => "Faerlina"},
|
||||||
|
%{"id" => 150, "category" => "classic_realm", "title" => "Fairbanks"},
|
||||||
|
%{"id" => 151, "category" => "classic_realm", "title" => "Herod"},
|
||||||
|
%{"id" => 152, "category" => "classic_realm", "title" => "Thalnos"},
|
||||||
|
%{"id" => 153, "category" => "classic_realm", "title" => "Whitemane"},
|
||||||
|
%{"id" => 154, "category" => "classic_realm", "title" => "Stalagg"},
|
||||||
|
%{"id" => 155, "category" => "classic_realm", "title" => "Blaumeux"},
|
||||||
|
%{"id" => 156, "category" => "classic_realm", "title" => "Skeram"},
|
||||||
|
%{"id" => 157, "category" => "classic_realm", "title" => "Bloodsail Buccaneers"},
|
||||||
|
%{"id" => 158, "category" => "classic_realm", "title" => "Grobbulus"},
|
||||||
|
%{"id" => 159, "category" => "classic_realm", "title" => "Incendius"},
|
||||||
|
%{"id" => 160, "category" => "classic_realm", "title" => "Bigglesworth"},
|
||||||
|
%{"id" => 161, "category" => "classic_realm", "title" => "Old Blanchy"},
|
||||||
|
%{"id" => 162, "category" => "classic_realm", "title" => "Westfall"},
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user