Skip to content
Closed
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
28 changes: 17 additions & 11 deletions components/buttons/GithubButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link';
import React from 'react';

import { ButtonIconPosition, ButtonSize } from '@/types/components/buttons/ButtonPropsType';
Expand Down Expand Up @@ -30,16 +31,21 @@ export default function GithubButton({
const { t } = useTranslation('common');

return (
<Button
text={t(text)}
icon={<IconGithub className='-mt-1 inline-block size-6' />}
href={href}
iconPosition={iconPosition}
target={target}
className={className}
data-testid='Github-button'
bgClassName='bg-gray-800 hover:bg-gray-700'
buttonSize={inNav ? ButtonSize.SMALL : ButtonSize.DEFAULT}
/>
<div>
<Button
text={t(text)}
icon={<IconGithub className='-mt-1 inline-block size-6' />}
href={href}
iconPosition={iconPosition}
target={target}
className={`${className}ml-1 hidden xl:inline-block`}
data-testid='Github-button'
bgClassName='bg-gray-800 hover:bg-gray-700'
buttonSize={inNav ? ButtonSize.SMALL : ButtonSize.DEFAULT}
/>
<Link href={href} target={target} aria-label='Visit AsyncAPI Github Repository'>
<IconGithub className='-mt-1 ml-2 inline-block size-8 xl:hidden' />
</Link>
</div>
);
}
2 changes: 1 addition & 1 deletion scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function start() {
return parseFloat(b) - parseFloat(a);
});

if (yearsList.length === 0) {
if (!yearsList || yearsList.length === 0) {
throw new Error('No finance data found in the finance directory.');
}

Expand Down
Loading