mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 17:49:09 +00:00
chore: update prettier tab width for consistency (#175)
This commit is contained in:
parent
a931f8c69c
commit
f24d2fcc99
247 changed files with 7224 additions and 7375 deletions
|
@ -6,38 +6,38 @@ import * as React from 'react';
|
|||
import { CardContainer, ContentContainer, SectionHead } from './ServersListing.styled';
|
||||
|
||||
type ServersListingProps = {
|
||||
guilds: GuildSlug[];
|
||||
recentGuilds: string[];
|
||||
guilds: GuildSlug[];
|
||||
recentGuilds: string[];
|
||||
};
|
||||
|
||||
const CardList = (props: { guilds: GuildSlug[] }) => (
|
||||
<>
|
||||
{props.guilds.map((guild, idx) => (
|
||||
<CardContainer key={idx}>
|
||||
<CompletelyStylelessLink to={`/s/${guild.id}`}>
|
||||
<ServerListingCard guild={guild} />
|
||||
</CompletelyStylelessLink>
|
||||
</CardContainer>
|
||||
))}
|
||||
</>
|
||||
<>
|
||||
{props.guilds.map((guild, idx) => (
|
||||
<CardContainer key={idx}>
|
||||
<CompletelyStylelessLink to={`/s/${guild.id}`}>
|
||||
<ServerListingCard guild={guild} />
|
||||
</CompletelyStylelessLink>
|
||||
</CardContainer>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
|
||||
export const ServersListing = (props: ServersListingProps) => {
|
||||
const { recentGuildSlugs, sortedGuildSlugs } = getRecentAndSortedGuilds(
|
||||
props.guilds,
|
||||
props.recentGuilds
|
||||
);
|
||||
const { recentGuildSlugs, sortedGuildSlugs } = getRecentAndSortedGuilds(
|
||||
props.guilds,
|
||||
props.recentGuilds
|
||||
);
|
||||
|
||||
return (
|
||||
<ContentContainer>
|
||||
{recentGuildSlugs.length !== 0 && (
|
||||
<>
|
||||
<SectionHead>Recent Guilds</SectionHead>
|
||||
<CardList guilds={recentGuildSlugs} />
|
||||
<SectionHead>All Guilds</SectionHead>
|
||||
</>
|
||||
)}
|
||||
<CardList guilds={sortedGuildSlugs} />
|
||||
</ContentContainer>
|
||||
);
|
||||
return (
|
||||
<ContentContainer>
|
||||
{recentGuildSlugs.length !== 0 && (
|
||||
<>
|
||||
<SectionHead>Recent Guilds</SectionHead>
|
||||
<CardList guilds={recentGuildSlugs} />
|
||||
<SectionHead>All Guilds</SectionHead>
|
||||
</>
|
||||
)}
|
||||
<CardList guilds={sortedGuildSlugs} />
|
||||
</ContentContainer>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue