From df79a34120dfb1cec776a55acf685e16a17fffba Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Tue, 8 Feb 2022 17:26:56 +0200 Subject: [PATCH] fix: fixing some issues from merging --- .storybook/preview.js | 6 +++-- src/Components/Button/Button.tsx | 7 +++-- src/Components/Navbar/NavMobile.tsx | 18 ++++++------- src/Components/Navbar/Navbar.tsx | 16 ++++++------ src/Components/TipButton/TipButton.tsx | 26 +------------------ src/index.tsx | 19 +++----------- .../ProjectCard/ProjectCard.Skeleton.tsx | 10 +++---- .../ProjectPage/ProjectCard/ProjectCard.tsx | 4 +-- src/utils/Wrapper.tsx | 6 +++-- src/utils/hoc.tsx | 14 ++++++++-- 10 files changed, 54 insertions(+), 72 deletions(-) diff --git a/.storybook/preview.js b/.storybook/preview.js index ea2f2e8..bd3ad23 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -21,11 +21,13 @@ import { BrowserRouter } from "react-router-dom"; const client = new ApolloClient({ - uri: 'https://deploy-preview-2--makers-bolt-fun.netlify.app/.netlify/functions/graphql', + uri: process.env.NODE_ENV === 'development' ? + 'https://xenodochial-goldstine-d09942.netlify.app/.netlify/functions/graphql' + : + '/.netlify/functions/graphql', cache: new InMemoryCache() }); - export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, controls: { diff --git a/src/Components/Button/Button.tsx b/src/Components/Button/Button.tsx index d2f0af3..31f737c 100644 --- a/src/Components/Button/Button.tsx +++ b/src/Components/Button/Button.tsx @@ -9,6 +9,7 @@ interface Props { size?: 'sm' | 'md' | 'lg' children: ReactNode; href?: string; + newTab?: boolean; fullWidth?: boolean; onClick?: () => void; className?: string @@ -53,7 +54,7 @@ const btnPadding: UnionToObjectKeys = { lg: 'py-12 px-36 text-body4' } -export default function Button({ color = 'white', variant = 'fill', isLoading, disableOnLoading = true, size = 'md', fullWidth, href, className, onClick, children, ...props }: Props) { +export default function Button({ color = 'white', variant = 'fill', isLoading, disableOnLoading = true, size = 'md', fullWidth, href, newTab, className, onClick, children, ...props }: Props) { let classes = ` inline-block font-sans rounded-lg font-regular border border-gray-300 hover:cursor-pointer @@ -83,6 +84,8 @@ export default function Button({ color = 'white', variant = 'fill', isLoading, d {/* {isLoading ? : children} */} {children} - , href) + , href, { + newTab + }) ) } diff --git a/src/Components/Navbar/NavMobile.tsx b/src/Components/Navbar/NavMobile.tsx index 8a74841..0eece51 100644 --- a/src/Components/Navbar/NavMobile.tsx +++ b/src/Components/Navbar/NavMobile.tsx @@ -44,22 +44,22 @@ export default function NavMobile({ onSearch }: Props) { return (