Skip to content

Commit

Permalink
Merge pull request #21 from zolplay-cn/dev
Browse files Browse the repository at this point in the history
Twitter branding update
  • Loading branch information
CaliCastle authored Oct 2, 2023
2 parents ebd0271 + e4f0f46 commit 387026f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
15 changes: 2 additions & 13 deletions app/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { ComponentProps } from '@zolplay/react'
import { clsxm } from '@zolplay/utils'
import { LocaleSelector } from '~/app/LocaleSelector'
import { ThemeSelector } from '~/app/ThemeSelector'
import { BrandXIcon } from '~/components/icons/BrandXIcon'
import { Logo, LogoHelmet } from '~/components/Logo'
import { Clock } from '~/components/ui/Clock'
import { motion } from 'framer-motion'
Expand Down Expand Up @@ -34,19 +35,7 @@ const social = [
{
name: 'Twitter',
url: 'https://twitter.com/zolplay',
icon: (props: any) => (
<svg
viewBox="0 0 37 34"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M0.45849 33.5746L13.8922 18.88L0 0.425781H11.4393L20.1735 11.9797L30.7876 0.425781H35.1661L22.145 14.616L36.427 33.5746H24.9648L15.8637 21.5163L4.83706 33.5746H0.45849ZM26.4778 31.0758H31.1544L9.94922 2.92455H5.24971L26.4778 31.0758Z"
fill="currentColor"
/>
</svg>
),
icon: BrandXIcon,
},
{
name: 'GitHub',
Expand Down
18 changes: 18 additions & 0 deletions components/icons/BrandXIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import type { SVGProps } from 'react'

export function BrandXIcon(props: SVGProps<any>) {
return (
<svg
viewBox="0 0 37 34"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M0.45849 33.5746L13.8922 18.88L0 0.425781H11.4393L20.1735 11.9797L30.7876 0.425781H35.1661L22.145 14.616L36.427 33.5746H24.9648L15.8637 21.5163L4.83706 33.5746H0.45849ZM26.4778 31.0758H31.1544L9.94922 2.92455H5.24971L26.4778 31.0758Z"
fill="currentColor"
/>
</svg>
)
}
6 changes: 3 additions & 3 deletions components/members/OurMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import type { Component } from '@zolplay/react'
import { clsxm } from '@zolplay/utils'
import { BrandXIcon } from '~/components/icons/BrandXIcon'
import { ZpBrandReadCV } from '~/components/icons/ZpBrandReadCV'
import { LogoHelmet } from '~/components/Logo'
import { urlForImage } from '~/lib/sanity.image'
Expand All @@ -17,7 +18,6 @@ import {
TbBrandGithub,
TbBrandInstagram,
TbBrandLinkedin,
TbBrandTwitter,
TbBrandYoutube,
} from 'react-icons/tb'
import Tilt from 'react-parallax-tilt'
Expand Down Expand Up @@ -55,7 +55,7 @@ export function OurMembers({ members }: { members: Member[] }) {
type Unarray<T> = T extends Array<infer U> ? U : T
const SocialIconMap: Record<Unarray<Member['social']>['platform'], Component> =
{
twitter: TbBrandTwitter,
twitter: BrandXIcon,
youtube: TbBrandYoutube,
github: TbBrandGithub,
linkedin: TbBrandLinkedin,
Expand All @@ -75,7 +75,7 @@ function SocialLink({ social }: { social: Unarray<Member['social']> }) {
target="_blank"
className="transition-transform duration-200 hover:-rotate-6 hover:scale-105"
>
<Icon className="h-5 w-5" />
<Icon className={social.platform === 'twitter' ? 'h-4' : 'h-5 w-5'} />
</Link>
</li>
)
Expand Down

1 comment on commit 387026f

@vercel
Copy link

@vercel vercel bot commented on 387026f Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.