Skip to content

Commit

Permalink
fixing some issues, custom-classname is a pain.
Browse files Browse the repository at this point in the history
  • Loading branch information
sphinxrave committed Oct 16, 2023
1 parent 84b6d2d commit 41d237c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
9 changes: 9 additions & 0 deletions packages/react/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ module.exports = {
'plugin:tailwindcss/recommended',
],
plugins: ['react-refresh'],
settings: {
tailwindcss: {
"whitelist": [
'i\\-.+:?.+',
// doesn't work see: [https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/284]
],
},
},

ignorePatterns: ['dist', '.eslintrc.cjs'],

Expand All @@ -25,5 +33,6 @@ module.exports = {
{ allowConstantExport: true },
],
'@typescript-eslint/no-unused-vars': ['warn'],
"tailwindcss/no-custom-classname": ['warn']
},
}
2 changes: 1 addition & 1 deletion packages/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"eslint": "^8.51.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"eslint-plugin-tailwindcss": "^3.13.0",
"eslint-plugin-tailwindcss": "3.13.0",
"i18next-scanner": "^4.4.0",
"lightningcss": "^1.22.0",
"postcss": "^8.4.31",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/common/ErrorFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function ErrorFallback(props?: FallbackProps) {
const error = routeError ?? (props?.error as Error | null);

return (
<div className=" h-full w-full overflow-y-auto p-8">
<div className="h-full w-full overflow-y-auto p-8">
<div className="mx-auto flex h-full w-full max-w-screen-lg flex-col items-center gap-4">
<h2 className="text-3xl font-bold">{t("Gomenasorry!")}</h2>
<p>
Expand Down Expand Up @@ -54,7 +54,7 @@ export function ErrorFallback(props?: FallbackProps) {
<code className="max-w-full shrink-0 overflow-x-auto whitespace-pre rounded-md bg-black/10 p-2 text-xs">
{error?.stack}
</code>
<TwitterFeed className="w-[min(800px, calc(100vw - 40px))] flex h-[400px] justify-center" />
<TwitterFeed className="w-[min(800px,calc(100vw-40px))] flex h-[400px] justify-center" />
</div>
</div>
);
Expand Down
30 changes: 15 additions & 15 deletions packages/react/src/components/video/VideoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function VideoCard({
return `https://i.ytimg.com/vi/${id}/hqdefault.jpg`;
}
})(),
[type, thumbnail, id],
[type, thumbnail, id, size],
);

switch (size) {
Expand All @@ -77,9 +77,9 @@ export function VideoCard({
onClick={
onThumbnailClick
? (e) => {
e.preventDefault();
onThumbnailClick(e);
}
e.preventDefault();
onThumbnailClick(e);
}
: undefined
}
>
Expand Down Expand Up @@ -176,9 +176,9 @@ export function VideoCard({
onClick={
onThumbnailClick
? (e) => {
e.preventDefault();
onThumbnailClick(e);
}
e.preventDefault();
onThumbnailClick(e);
}
: undefined
}
>
Expand Down Expand Up @@ -217,9 +217,9 @@ export function VideoCard({
onClick={
onInfoClick
? (e) => {
e.preventDefault();
onInfoClick(e);
}
e.preventDefault();
onInfoClick(e);
}
: undefined
}
>
Expand All @@ -231,9 +231,9 @@ export function VideoCard({
onClick={
onChannelClick
? (e) => {
e.preventDefault();
onChannelClick(e);
}
e.preventDefault();
onChannelClick(e);
}
: undefined
}
>
Expand Down Expand Up @@ -327,8 +327,8 @@ function VideoCardDuration({
(end_actual && start_actual
? new Date(end_actual).valueOf() - new Date(start_actual).valueOf()
: start_actual
? date.valueOf() - new Date(start_actual).valueOf()
: null);
? date.valueOf() - new Date(start_actual).valueOf()
: null);

return durationMs ?? status === "upcoming" ? (
<span
Expand Down

0 comments on commit 41d237c

Please sign in to comment.