Skip to content

Commit

Permalink
Add X social icon
Browse files Browse the repository at this point in the history
  • Loading branch information
venables committed Jan 5, 2024
1 parent cc00ebf commit 47fde1c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/auth/external-auth-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { type LucideIcon } from "lucide-react"
import { signIn } from "next-auth/react"
import { useCallback, useMemo, useState } from "react"

import { GoogleIcon } from "@/components/icons/social"
import { GoogleSocialIcon } from "@/components/icons/social"
import { Spinner } from "@/components/spinner"
import { Button } from "@/components/ui/button"

const PROVIDERS = {
google: {
name: "Google",
icon: GoogleIcon as LucideIcon
icon: GoogleSocialIcon as LucideIcon
},
github: {
name: "GitHub",
Expand Down
2 changes: 1 addition & 1 deletion components/icons/social/google-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type SVGProps } from "react"

export function GoogleIcon(props: SVGProps<SVGSVGElement>) {
export function GoogleSocialIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg fill="none" viewBox="0 0 24 24" {...props}>
<path
Expand Down
1 change: 1 addition & 0 deletions components/icons/social/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./google-icon"
export * from "./x-icon"
17 changes: 17 additions & 0 deletions components/icons/social/x-icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { type SVGProps } from "react"

export function XSocialIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
fill="none"
stroke="currentColor"
strokeWidth={2}
viewBox="0 0 24 24"
{...props}
>
<polygon points="2.07 2 7.04 2 21.93 22 16.96 22 2.07 2" />
<line x1="10.4" x2="2.24" y1="13.19" y2="22" />
<line x1="20.76" x2="13.15" y1="2" y2="10.21" />
</svg>
)
}
7 changes: 4 additions & 3 deletions components/layout/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { GithubIcon, TwitterIcon } from "lucide-react"
import { GithubIcon } from "lucide-react"
import Link from "next/link"

import { XSocialIcon } from "@/components/icons/social"
import { ThemePicker } from "@/components/theme-picker"
import { Button } from "@/components/ui/button"
import { siteConfig } from "@/config"
Expand All @@ -12,9 +13,9 @@ const navigation = [
icon: GithubIcon
},
{
name: "Twitter",
name: "X",
href: siteConfig.links.twitter,
icon: TwitterIcon
icon: XSocialIcon
}
]

Expand Down

0 comments on commit 47fde1c

Please sign in to comment.