Skip to content

Commit

Permalink
update x link
Browse files Browse the repository at this point in the history
  • Loading branch information
encryptedDegen committed Aug 27, 2024
1 parent 31cda9f commit ce2fed0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
9 changes: 3 additions & 6 deletions scripts/update-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ async function fetchPackageLatestVersion(name: string) {
}

function getUnstableDependencies(dependencies: Record<string, string>) {
return (
Object.entries(dependencies)
.filter(([, version]) => /alpha|beta/.test(version))
// biome-ignore lint/performance/noAccumulatingSpread: <explanation>
.reduce((acc, [name, version]) => ({ ...acc, [name]: version }), {}) as Record<string, string>
)
return Object.entries(dependencies)
.filter(([, version]) => /alpha|beta/.test(version))
.reduce((acc, [name, version]) => ({ ...acc, [name]: version }), {}) as Record<string, string>
}
10 changes: 7 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default function App() {
<Flex direction='column' gap='5' mx='auto' width='100%'>
<Box>
<Flex className='space-x-6' align='center' justify='center' pt='5'>
<Link target='_blank' rel='noopener noreferrer' href='https://x.com/ethfollowpr'>
<Link target='_blank' rel='noopener noreferrer' href='https://x.com/efp'>
<Avatar src='/logo.png' fallback='/logo.png' size='3' />
</Link>
<Flex className='sm:flex-row flex-col space-x-3' align='center' justify='center'>
Expand All @@ -110,15 +110,19 @@ export default function App() {
<Tabs.List size='1' className='mx-auto justify-center shadow-none gap-x-28'>
<div
onClick={() => setActiveTab('Followers')}
className={`before:bg-transparent p-3 cursor-pointer flex items-center ${activeTab === 'Followers' ? 'bg-white/80' : 'transparent hover:bg-white/50'} hover:rounded-full transition-colors rounded-full data-[state=active]:font-extrabold`}
className={`before:bg-transparent p-3 cursor-pointer flex items-center ${
activeTab === 'Followers' ? 'bg-white/80' : 'transparent hover:bg-white/50'
} hover:rounded-full transition-colors rounded-full data-[state=active]:font-extrabold`}
>
<Text size='3' weight='bold'>
Followers
</Text>
</div>
<div
onClick={() => setActiveTab('Following')}
className={`before:bg-transparent p-3 cursor-pointer flex items-center ${activeTab === 'Following' ? 'bg-white/80' : 'transparent hover:bg-white/50'} hover:rounded-full transition-colors rounded-full data-[state=active]:font-extrabold`}
className={`before:bg-transparent p-3 cursor-pointer flex items-center ${
activeTab === 'Following' ? 'bg-white/80' : 'transparent hover:bg-white/50'
} hover:rounded-full transition-colors rounded-full data-[state=active]:font-extrabold`}
>
<Text size='3' weight='bold'>
Following
Expand Down
12 changes: 6 additions & 6 deletions src/fetchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export interface EfpUserFollower {
}

export interface EfpUser extends EfpUserStats {
followers: Array<EfpUserFollower | undefined>
following: Array<EfpUserFollowing | undefined>
followers: (EfpUserFollower | undefined)[]
following: (EfpUserFollowing | undefined)[]
}

/**
Expand All @@ -45,28 +45,28 @@ export async function fetchEfpUserStats(address: Address): Promise<EfpResponse<E

export async function fetchEfpUserFollowers(
address: Address
): Promise<EfpResponse<Array<EfpUserFollower>>> {
): Promise<EfpResponse<EfpUserFollower[]>> {
if (!isAddress(address)) throw new Error(`${address} is not a valid address`)
const response = await fetch(`${API_URL}/${API_VERSION}/followers/${address}`, {
method: 'GET'
})
if (!response.ok) {
throw new Error(`Error for ${address}: ${response.statusText}`)
}
return (await response.json()) as EfpResponse<Array<EfpUserFollower>>
return (await response.json()) as EfpResponse<EfpUserFollower[]>
}

export async function fetchEfpUserFollowing(
address: Address
): Promise<EfpResponse<Array<EfpUserFollowing>>> {
): Promise<EfpResponse<EfpUserFollowing[]>> {
if (!isAddress(address)) throw new Error(`${address} is not a valid address`)
const response = await fetch(`${API_URL}/${API_VERSION}/following/${address}`, {
method: 'GET'
})
if (!response.ok) {
throw new Error(`Error for ${address}: ${response.statusText}`)
}
return (await response.json()) as EfpResponse<Array<EfpUserFollowing>>
return (await response.json()) as EfpResponse<EfpUserFollowing[]>
}

export async function fetchEfpUser(address: Address): Promise<EfpResponse<EfpUser>> {
Expand Down

0 comments on commit ce2fed0

Please sign in to comment.