mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-08 08:22:48 +00:00
feat: add new realms
This commit is contained in:
@@ -12,6 +12,7 @@ interface Props extends RouteComponentProps<any> {}
|
||||
|
||||
interface State {
|
||||
realms: CategoryModel[];
|
||||
classicRealms: CategoryModel[];
|
||||
}
|
||||
|
||||
export class Realms extends React.Component<Props, State> {
|
||||
@@ -20,6 +21,7 @@ export class Realms extends React.Component<Props, State> {
|
||||
super(props);
|
||||
this.state = {
|
||||
realms: [],
|
||||
classicRealms: [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +33,11 @@ export class Realms extends React.Component<Props, State> {
|
||||
.filter({ category: 'realm' })
|
||||
.orderBy(['title'])
|
||||
.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) {
|
||||
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>
|
||||
|
||||
<h1>Classic Realms</h1>
|
||||
|
||||
<ul className="realm-column">
|
||||
{this.renderRealms(this.state.classicRealms)}
|
||||
</ul>
|
||||
|
||||
<h1>Legacy Realms</h1>
|
||||
|
||||
<div className="flex flex--wrap">
|
||||
<ul className="realm-column">
|
||||
{this.renderRealms(list1)}
|
||||
|
||||
@@ -8,7 +8,7 @@ use Mix.Config
|
||||
# with brunch.io to recompile .js and .css sources.
|
||||
config :myapp, MyAppWeb.Endpoint,
|
||||
host: "0.0.0.0",
|
||||
http: [port: 8080],
|
||||
http: [port: 5035],
|
||||
debug_errors: true,
|
||||
code_reloader: true,
|
||||
check_origin: false,
|
||||
|
||||
@@ -163,6 +163,26 @@ defmodule Category do
|
||||
# additional realms
|
||||
%{"id" => 143, "category" => "realm", "title" => "Sentinels"},
|
||||
%{"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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user