chore: update prettier tab width for consistency (#175)

This commit is contained in:
41666 2021-03-13 22:54:34 -05:00 committed by GitHub
parent a931f8c69c
commit f24d2fcc99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
247 changed files with 7224 additions and 7375 deletions

View file

@ -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>
);
};