Skip to content

Commit

Permalink
fix: 🐛 update faq
Browse files Browse the repository at this point in the history
  • Loading branch information
megasanjay committed Jun 3, 2024
1 parent 15f433b commit dad0079
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"next-router-mock": "^0.7.4",
"next-sitemap": "^2.5.28",
"postcss": "^8.4.18",
"prettier": "^2.7.1",
"prettier": "3.3.0",
"prettier-plugin-tailwindcss": "0.6.1",
"run-script-os": "^1.1.6",
"tailwindcss": "^3.2.2",
Expand Down
4 changes: 2 additions & 2 deletions src/components/NextImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function NextImage({
...rest
}: NextImageProps) {
const [status, setStatus] = React.useState(
useSkeleton ? 'loading' : 'complete'
useSkeleton ? 'loading' : 'complete',
);

const widthIsSet = className?.includes('w-') ?? false;
Expand All @@ -44,7 +44,7 @@ export default function NextImage({
<Image
className={clsxm(
imgClassName,
status === 'loading' && clsxm('animate-pulse', blurClassName)
status === 'loading' && clsxm('animate-pulse', blurClassName),
)}
src={src}
width={width}
Expand Down
9 changes: 4 additions & 5 deletions src/components/Seo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ export default function Seo(props: SeoProps) {

meta['description'] = props.templateDescription || meta.description;

meta[
'image'
] = `https://kalai.fairdataihub.org/api/generate?app=ai-readi&title=${encodeURIComponent(
meta.title
)}&org=ai-readi&description=${encodeURIComponent(meta.description)}`;
meta['image'] =
`https://kalai.fairdataihub.org/api/generate?app=ai-readi&title=${encodeURIComponent(
meta.title,
)}&org=ai-readi&description=${encodeURIComponent(meta.description)}`;

return (
<Head>
Expand Down
8 changes: 4 additions & 4 deletions src/components/buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
isDarkBg = false,
...rest
},
ref
ref,
) => {
const disabled = isLoading || buttonDisabled;

Expand Down Expand Up @@ -81,7 +81,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
'disabled:cursor-not-allowed',
isLoading &&
'relative text-transparent transition-none hover:text-transparent disabled:cursor-wait',
className
className,
)}
{...rest}
>
Expand All @@ -93,7 +93,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
'text-white': ['primary', 'dark'].includes(variant),
'text-black': ['light'].includes(variant),
'text-primary-500': ['outline', 'ghost'].includes(variant),
}
},
)}
>
<ImSpinner2 className='animate-spin' />
Expand All @@ -102,7 +102,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
{children}
</button>
);
}
},
);

export default Button;
4 changes: 2 additions & 2 deletions src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ export default function Header() {
key={item.name}
href={item.href}
className={clsx(
'group relative my-2 flex w-full items-start gap-x-6 rounded-lg p-4 text-sm transition-all hover:bg-sky-50'
'group relative my-2 flex w-full items-start gap-x-6 rounded-lg p-4 text-sm transition-all hover:bg-sky-50',
)}
>
<div
className={clsx(
'flex h-12 w-12 flex-none items-center justify-center rounded-lg bg-sky-100 group-hover:bg-white group-hover:text-sky-500'
'flex h-12 w-12 flex-none items-center justify-center rounded-lg bg-sky-100 group-hover:bg-white group-hover:text-sky-500',
)}
>
<Icon icon={item.icon} width={20} />
Expand Down
6 changes: 3 additions & 3 deletions src/components/links/ArrowLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function ArrowLink<C extends React.ElementType>({
className={clsxm(
'group gap-[0.25em]',
direction === 'left' && 'flex-row-reverse',
className
className,
)}
>
<span>{children}</span>
Expand All @@ -40,7 +40,7 @@ export default function ArrowLink<C extends React.ElementType>({
'relative',
'transition-transform duration-200',
direction === 'right' ? 'motion-safe:-translate-x-1' : 'rotate-180',
'group-hover:translate-x-0'
'group-hover:translate-x-0',
)}
>
<path
Expand All @@ -55,7 +55,7 @@ export default function ArrowLink<C extends React.ElementType>({
className={clsxm(
'origin-left transition-all duration-200',
'opacity-0 motion-safe:-translate-x-1',
'group-hover:translate-x-0 group-hover:opacity-100'
'group-hover:translate-x-0 group-hover:opacity-100',
)}
/>
</svg>
Expand Down
6 changes: 3 additions & 3 deletions src/components/links/ButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type ButtonLinkProps = {
const ButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(
(
{ children, className, variant = 'primary', isDarkBg = false, ...rest },
ref
ref,
) => {
return (
<UnstyledLink
Expand Down Expand Up @@ -70,13 +70,13 @@ const ButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(
],
//#endregion //*======== Variants ===========
'disabled:cursor-not-allowed',
className
className,
)}
>
{children}
</UnstyledLink>
);
}
},
);

export default ButtonLink;
4 changes: 2 additions & 2 deletions src/components/links/PrimaryLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const PrimaryLink = React.forwardRef<HTMLAnchorElement, UnstyledLinkProps>(
'items-center',
'font-medium text-primary-600 hover:text-primary-500',
'focus:outline-none focus-visible:rounded focus-visible:ring focus-visible:ring-primary-500 focus-visible:ring-offset-2',
className
className,
)}
>
{children}
</UnstyledLink>
);
}
},
);

export default PrimaryLink;
4 changes: 2 additions & 2 deletions src/components/links/UnderlineLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const UnderlineLink = React.forwardRef<HTMLAnchorElement, UnstyledLinkProps>(
'animated-underline custom-link inline-flex items-center font-medium',
'focus:outline-none focus-visible:rounded focus-visible:ring focus-visible:ring-primary-500 focus-visible:ring-offset-2',
'border-b border-dotted border-dark hover:border-black/0',
className
className,
)}
>
{children}
</UnstyledLink>
);
}
},
);

export default UnderlineLink;
2 changes: 1 addition & 1 deletion src/components/links/UnstyledLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const UnstyledLink = React.forwardRef<HTMLAnchorElement, UnstyledLinkProps>(
{children}
</a>
);
}
},
);

export default UnstyledLink;
2 changes: 1 addition & 1 deletion src/lib/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export default function logger(object: unknown, comment?: string): void {
'color: #22D3EE',
`${typeof window !== 'undefined' && window?.location.pathname}\n`,
`=== ${comment ?? ''}\n`,
object
object,
);
}
2 changes: 1 addition & 1 deletion src/pages/api/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Data = {

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
res: NextApiResponse<Data>,
) {
// if (req.method === `POST`) {
// const { email, subject, message } = JSON.parse(req.body);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ComponentsPage() {
<div
className={clsx(
'layout min-h-screen py-20',
mode === 'dark' ? 'text-white' : 'text-black'
mode === 'dark' ? 'text-white' : 'text-black',
)}
>
<h1>Built-in Components</h1>
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function ComponentsPage() {
mode === 'dark'
? 'border border-gray-600 bg-dark'
: 'border-gray-300 bg-white',
'focus:border-primary-400 focus:outline-none focus:ring focus:ring-primary-400'
'focus:border-primary-400 focus:outline-none focus:ring focus:ring-primary-400',
)}
onChange={(e) => setColor(e.target.value as Color)}
>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/events/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ export async function getStaticProps() {
eventList.sort((a, b) => {
const a_date = dayjs(
a.frontMatter.startDateTime,
`YYYY-MM-DD`
`YYYY-MM-DD`,
) as unknown as number;

const b_date = dayjs(
b.frontMatter.startDateTime,
`YYYY-MM-DD`
`YYYY-MM-DD`,
) as unknown as number;

return b_date - a_date;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -771,15 +771,15 @@ export async function getStaticProps() {
.sort(
(a, b) =>
dayjs(a.frontMatter.startDateTime).valueOf() -
dayjs(b.frontMatter.startDateTime).valueOf()
dayjs(b.frontMatter.startDateTime).valueOf(),
)[0];

if (!closestUpcomingEvent) {
// If there are no upcoming events, get the most recent event
closestUpcomingEvent = eventList.sort(
(a, b) =>
dayjs(b.frontMatter.startDateTime).valueOf() -
dayjs(a.frontMatter.startDateTime).valueOf()
dayjs(a.frontMatter.startDateTime).valueOf(),
)[0];
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/publications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const PublicationsPage: React.FC<{ pageContent: string }> = ({
export const getStaticProps: GetStaticProps = async () => {
const fileContent = fs.readFileSync(
`src/pages/publications/content.md`,
`utf-8`
`utf-8`,
);

const pageContent = await markdownToHtml(fileContent || ``);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/scholars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export const getStaticProps = async () => {
...member,
blurDataURL: base64,
};
})
}),
).then((values) => values);

// sort by name
Expand Down
2 changes: 1 addition & 1 deletion src/pages/study/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ export const getStaticProps = async () => {
const StudyTeamIds = ['Cynthia-Owsley', 'Linda-Zangwill', 'Cecilia-Lee'];

const StudyTeam = TEAM_JSON.filter((person) =>
StudyTeamIds.includes(person.id)
StudyTeamIds.includes(person.id),
);

// sort by name
Expand Down
2 changes: 1 addition & 1 deletion src/pages/team/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export const getStaticProps = async () => {
...member,
blurDataURL: base64,
};
})
}),
).then((values) => values);

// sort by name
Expand Down
6 changes: 3 additions & 3 deletions src/utils/moduleMembersFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TEAM_JSON from '~/data/team.json';
* @returns
*/
export default async function ModuleMembersFilter(
module: string
module: string,
): Promise<ModuleMemberType[]> {
const AllTeamMembers: ModuleMemberType[] = await Promise.all(
TEAM_JSON.map(async (member) => {
Expand All @@ -24,11 +24,11 @@ export default async function ModuleMembersFilter(
...member,
blurDataURL: base64,
};
})
}),
).then((values) => values);

const FilteredTeamMembers = AllTeamMembers.filter((member) =>
member.modules.includes(module)
member.modules.includes(module),
);

FilteredTeamMembers.sort((a, b) => {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8163,10 +8163,10 @@ prettier-plugin-tailwindcss@0.6.1:
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.1.tgz#6cb1f5f3e1a8d8b5ea3f97d19be516d9ce9931bf"
integrity sha512-AnbeYZu0WGj+QgKciUgdMnRxrqcxltleZPgdwfA5104BHM3siBLONN/HLW1yS2HvzSNkzpQ/JAj+LN0jcJO+0w==

prettier@^2.7.1:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
prettier@3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.0.tgz#d173ea0524a691d4c0b1181752f2b46724328cdf"
integrity sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==

pretty-format@^27.0.2, pretty-format@^27.5.1:
version "27.5.1"
Expand Down

0 comments on commit dad0079

Please sign in to comment.