mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
remove banner on mobile/tablet devices
This commit is contained in:
@ -12,13 +12,13 @@ import {
|
||||
FormMessage,
|
||||
Input,
|
||||
} from "@reactive-resume/ui";
|
||||
import { ControllerRenderProps, useForm } from "react-hook-form";
|
||||
import { useCallback } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { useDebounceValue } from "usehooks-ts";
|
||||
import { z } from "zod";
|
||||
|
||||
import { SectionDialog } from "../sections/shared/section-dialog";
|
||||
import { URLInput } from "../sections/shared/url-input";
|
||||
import { useDebounceValue } from "usehooks-ts";
|
||||
import { useCallback } from "react";
|
||||
|
||||
const formSchema = profileSchema;
|
||||
|
||||
@ -30,7 +30,7 @@ export const ProfilesDialog = () => {
|
||||
resolver: zodResolver(formSchema),
|
||||
});
|
||||
|
||||
const [iconSrc, setIconSrc] = useDebounceValue("", 400)
|
||||
const [iconSrc, setIconSrc] = useDebounceValue("", 400);
|
||||
|
||||
const handleIconChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (event.target.value === "") {
|
||||
@ -40,8 +40,6 @@ export const ProfilesDialog = () => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<SectionDialog<FormValues> id="profiles" form={form} defaultValues={defaultProfile}>
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
@ -97,17 +95,17 @@ export const ProfilesDialog = () => {
|
||||
<FormControl>
|
||||
<div className="flex items-center gap-x-2">
|
||||
<Avatar className="size-8 bg-white">
|
||||
{iconSrc && (
|
||||
<AvatarImage
|
||||
className="p-1.5"
|
||||
src={iconSrc}
|
||||
/>
|
||||
)}
|
||||
{iconSrc && <AvatarImage className="p-1.5" src={iconSrc} />}
|
||||
</Avatar>
|
||||
<Input {...field} id="iconSlug" placeholder="linkedin" onChange={(event) => {
|
||||
field.onChange(event)
|
||||
handleIconChange(event)
|
||||
}} />
|
||||
<Input
|
||||
{...field}
|
||||
id="iconSlug"
|
||||
placeholder="linkedin"
|
||||
onChange={(event) => {
|
||||
field.onChange(event);
|
||||
handleIconChange(event);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
@ -3,21 +3,20 @@
|
||||
import { HandHeart } from "@phosphor-icons/react";
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
export const DonationBanner = () => {
|
||||
return (
|
||||
<a href="https://opencollective.com/Reactive-Resume" target="_blank" rel="noreferrer">
|
||||
<motion.div
|
||||
whileHover={{ height: 48 }}
|
||||
initial={{ opacity: 0, y: -50, height: 32 }}
|
||||
animate={{ opacity: 1, y: 0, transition: { duration: 0.3 } }}
|
||||
className="flex w-screen items-center justify-center gap-x-2 bg-zinc-800 text-xs font-bold leading-relaxed text-zinc-50"
|
||||
>
|
||||
<HandHeart weight="bold" size={14} className="shrink-0" />
|
||||
<span>
|
||||
If this project has helped you, please consider donating to Reactive Resume as we're
|
||||
running out of server resources with the increasing number of users.
|
||||
</span>
|
||||
</motion.div>
|
||||
</a>
|
||||
);
|
||||
};
|
||||
export const DonationBanner = () => (
|
||||
<motion.a
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://opencollective.com/Reactive-Resume"
|
||||
whileHover={{ height: 48 }}
|
||||
initial={{ opacity: 0, y: -50, height: 32 }}
|
||||
animate={{ opacity: 1, y: 0, transition: { duration: 0.3 } }}
|
||||
className="hidden w-screen items-center justify-center gap-x-2 bg-zinc-800 text-xs font-bold leading-relaxed text-zinc-50 lg:flex"
|
||||
>
|
||||
<HandHeart weight="bold" size={14} className="shrink-0" />
|
||||
<span>
|
||||
If this project has helped you, please consider donating to Reactive Resume as we're running
|
||||
out of server resources with the increasing number of users.
|
||||
</span>
|
||||
</motion.a>
|
||||
);
|
||||
|
||||
@ -44,7 +44,6 @@ export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: "jsdom",
|
||||
cache: { dir: "../../node_modules/.vitest" },
|
||||
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user