mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-21 17:24:14 -05:00
fix links not working in portal
This commit is contained in:
parent
6c5017a516
commit
bc3cb96ee7
File diff suppressed because one or more lines are too long
|
|
@ -93,7 +93,7 @@ export default class Category extends React.Component {
|
|||
|
||||
bottom_nav = API.portal[this.type].data
|
||||
.sort(sortCardName)
|
||||
.map(thumb_link);
|
||||
.map((val, i) => thumb_link(val, i));
|
||||
}
|
||||
|
||||
if (base_path) {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export function text_link (card: Card, i: number) {
|
|||
|
||||
export function thumb_link (portalCard: Card, i: number, url?: string) {
|
||||
let collectionCard: Card | null = null;
|
||||
console.log(portalCard, i, url);
|
||||
if (["Attacks", "Battlegear", "Creatures", "Locations", "Mugic"].includes(portalCard.gsx$type)) {
|
||||
if (!url) url = `/portal/${portalCard.gsx$type}/${portalCard.gsx$name}`;
|
||||
collectionCard = API.cards[portalCard.gsx$type.toLowerCase()].findOne({ 'gsx$name': portalCard.gsx$name });
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class DBSearch extends React.Component {
|
|||
temp.forEach(function(v){ delete v.$loki });
|
||||
filter.insert(temp);
|
||||
|
||||
let content = pview.data().map(text_link);
|
||||
let content = pview.data().map((val, i) => text_link(val, i));
|
||||
this.filter.removeCollection('filter');
|
||||
|
||||
let header;
|
||||
|
|
@ -158,8 +158,8 @@ class DBSearch extends React.Component {
|
|||
.where((obj) => {return (obj.gsx$splash != ('') )}).data()
|
||||
)
|
||||
.sort(sortCardName)
|
||||
.map(thumb_link);
|
||||
|
||||
.map((val, i) => thumb_link(val, i));
|
||||
|
||||
// Check Artists
|
||||
if (content.length == 0) {
|
||||
const artists = [].concat(
|
||||
|
|
@ -180,7 +180,7 @@ class DBSearch extends React.Component {
|
|||
.where((obj) => {return (obj.gsx$splash != ('') )}).data()
|
||||
)
|
||||
.sort((a, b) => (a.gsx$name > b.gsx$name) ? 1 : -1)
|
||||
.map(text_link);
|
||||
.map((val, i) => text_link(val, i));
|
||||
|
||||
if (artists.length > 0) {
|
||||
header = `Art contributed by ${string}:`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user