Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/UI ux enhancement framegear #1241

Merged
4 changes: 2 additions & 2 deletions framegear/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export default function Home() {
return (
<RedirectModalProvider>
<TextInputsProvider>
<div className="mx-auto flex flex-col items-center gap-8 pb-16">
<div className="mx-auto flex flex-col items-center gap-8 pb-16 p-2">
<Header />
<div
className={`max-w-layout-max grid w-full grid-cols-[5fr,4fr] gap-16`}
className={`max-w-layout-max grid w-full grid-cols-1 lg:grid-cols-2 gap-16`}
>
<div className="flex flex-col gap-4">
<FrameInput />
Expand Down
4 changes: 2 additions & 2 deletions framegear/components/Frame/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function ValidFrame({ metadata }: { metadata: FrameMetadataWithImageObject }) {
<div>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
className={`w-full rounded-t-xl ${imageAspectRatioClassname} object-cover`}
src={image.src}
className={`w-full rounded-t-xl ${imageAspectRatioClassname} ${image.src ? "object-cover" : "object-contain"}`}
src={image.src ? image.src : "https://demofree.sirv.com/nope-not-here.jpg?w=750"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry we can not have links here on random websites.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would it be acceptable if I add the images directly to the public folder of the project and reference them from there?

Copy link
Contributor

Choose a reason for hiding this comment

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

yup, but only if it's a cool image. If it's not, is probably best have something else as default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
is it ok ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think is best we avoid add those kind of images so far. As we want our designer to take a look at it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll update the image based on the designer's review.

alt=""
/>
<div className="bg-button-gutter-light dark:bg-content-light flex flex-col gap-2 rounded-b-xl px-4 py-2">
Expand Down
7 changes: 5 additions & 2 deletions framegear/components/FrameInput/FrameInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ export function FrameInput() {
const [url, setUrl] = useState('');
const [_, setResults] = useAtom(frameResultsAtom);
const { setInputText } = useTextInputs();
const [isLoading, setIsLoading] = useState(false);

const getResults = useCallback(async () => {
setIsLoading(true)
const result = await fetchFrame(url);
setResults((prev) => [...prev, result]);
setInputText('');
setIsLoading(false)
}, [setInputText, setResults, url]);

return (
Expand All @@ -28,12 +31,12 @@ export function FrameInput() {
/>
</label>
<button
className="h-[40px] self-end rounded-full bg-white text-black"
className={`h-[40px] self-end rounded-full ${isLoading ? "bg-neutral-800 text-white" : "bg-white text-black"}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe you can use clx on Framegear as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I will implement the clx

type="button"
onClick={getResults}
disabled={url.length < 1}
>
Fetch
{isLoading ? "Loading..." : "Fetch"}
</button>
</div>
);
Expand Down
Loading