Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🦋 bluesky #435

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/components/Connect/Connect.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ test("shows connect", () => {
screen.getByText("Let's connect on these platforms."),
).toBeInTheDocument()

const labels = ["twitch", "github", "youtube", "x", "instagram", "discord"]
const labels = [
"bluesky",
"discord",
"feed",
"github",
"instagram",
"twitch",
"x",
"youtube",
]

labels.forEach(label => {
expect(screen.getByLabelText(label)).toBeInTheDocument()
Expand Down
4 changes: 3 additions & 1 deletion src/components/Connect/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ const Connect: FC = () => {
<p className="m-0">Let&apos;s connect on these platforms.</p>
</div>

<div className="grid grid-flow-col content-center justify-center gap-x-5">
<div className="flex flex-wrap content-center justify-center gap-5">
<SocialLink platform="twitch" />
<SocialLink platform="github" />
<SocialLink platform="bluesky" />
<SocialLink platform="youtube" />
<SocialLink platform="x" />
<SocialLink platform="instagram" />
<SocialLink platform="discord" />
<SocialLink platform="feed" />
</div>
</div>
)
Expand Down
1 change: 1 addition & 0 deletions src/components/Footer/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {expect, test} from "vitest"
import Footer from "~/components/Footer"

const labels = [
"bluesky",
"discord",
"feed",
"github",
Expand Down
3 changes: 2 additions & 1 deletion src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import SocialLink from "~/components/SocialLink"

const Footer: FC = () => {
return (
<footer className="grid grid-flow-col content-center justify-center gap-5 pb-20 pt-28">
<footer className="flex flex-wrap content-center justify-center gap-5 px-5 pb-20 pt-28">
<SocialLink platform="twitch" />
<SocialLink platform="github" />
<SocialLink platform="bluesky" />
<SocialLink platform="youtube" />
<SocialLink platform="x" />
<SocialLink platform="instagram" />
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon/Icon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Icon from "~/components/Icon"

const icons = [
"close",
"bluesky",
"discord",
"feed",
"gatsby",
Expand Down
3 changes: 3 additions & 0 deletions src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type {FC, HTMLAttributes} from "react"

import {
BlueskyIcon,
CloseIcon,
DiscordIcon,
FeedIcon,
Expand Down Expand Up @@ -31,6 +32,8 @@ type IconProps = {

const Icon: FC<IconProps> = ({name, ...props}) => {
switch (name) {
case "bluesky":
return <BlueskyIcon {...props} />
case "close":
return <CloseIcon {...props} />
case "discord":
Expand Down
11 changes: 11 additions & 0 deletions src/components/Icons/BlueskyIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type {FC} from "react"

const BlueskyIcon: FC = props => {
return (
<svg aria-label="bluesky" fill="none" viewBox="0 0 64 57" {...props}>
<path d="M13.873 3.805C21.21 9.332 29.103 20.537 32 26.55v15.882c0-.338-.13.044-.41.867-1.512 4.456-7.418 21.847-20.923 7.944-7.111-7.32-3.819-14.64 9.125-16.85-7.405 1.264-15.73-.825-18.014-9.015C1.12 23.022 0 8.51 0 6.55 0-3.268 8.579-.182 13.873 3.805ZM50.127 3.805C42.79 9.332 34.897 20.537 32 26.55v15.882c0-.338.13.044.41.867 1.512 4.456 7.418 21.847 20.923 7.944 7.111-7.32 3.819-14.64-9.125-16.85 7.405 1.264 15.73-.825 18.014-9.015C62.88 23.022 64 8.51 64 6.55c0-9.818-8.578-6.732-13.873-2.745Z" />
</svg>
)
}

export default BlueskyIcon
1 change: 1 addition & 0 deletions src/components/Icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export {default as BlueskyIcon} from "~/components/Icons/BlueskyIcon"
export {default as CloseIcon} from "~/components/Icons/CloseIcon"
export {default as DiscordIcon} from "~/components/Icons/DiscordIcon"
export {default as FeedIcon} from "~/components/Icons/FeedIcon"
Expand Down
5 changes: 5 additions & 0 deletions src/components/SocialLink/SocialLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import {expect, test} from "vitest"

import SocialLink from "~/components/SocialLink"

test("bluesky", () => {
render(<SocialLink platform="bluesky" />)
expect(screen.getByLabelText("bluesky")).toBeInTheDocument()
})

test("discord", () => {
render(<SocialLink platform="discord" />)
expect(screen.getByLabelText("discord")).toBeInTheDocument()
Expand Down
6 changes: 6 additions & 0 deletions src/components/SocialLink/SocialLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Icon from "~/components/Icon"

type SocialLinkProps = {
platform:
| "bluesky"
| "discord"
| "github"
| "instagram"
Expand All @@ -20,6 +21,11 @@ const SocialLink: FC<SocialLinkProps> = ({platform}) => {
let name

switch (platform) {
case "bluesky":
url = "/bluesky"
name = "bluesky"
break

case "discord":
url = "/discord"
name = "discord"
Expand Down
5 changes: 5 additions & 0 deletions src/routes/bluesky.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {redirect} from "@remix-run/node"

export const loader = () => {
throw redirect("https://bsky.app/profile/bradgarropy.com")
}