mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-30 11:44:30 +01:00
fix: fixing some issues from merging
This commit is contained in:
@@ -15,8 +15,10 @@ import {
|
||||
} from "@apollo/client";
|
||||
|
||||
const client = new ApolloClient({
|
||||
//uri: 'https://deploy-preview-2--makers-bolt-fun.netlify.app/.netlify/functions/graphql',
|
||||
uri: '/.netlify/functions/graphql',
|
||||
uri: process.env.NODE_ENV === 'development' ?
|
||||
'https://xenodochial-goldstine-d09942.netlify.app/.netlify/functions/graphql'
|
||||
:
|
||||
'/.netlify/functions/graphql',
|
||||
cache: new InMemoryCache()
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
|
||||
export function wrapLink(Component: JSX.Element, href: string | undefined, className?: string) {
|
||||
export function wrapLink(Component: JSX.Element, href: string | undefined, options: { className?: string, newTab?: boolean } = {}) {
|
||||
if (!href) return Component;
|
||||
|
||||
return <Link to={href} className={className}>
|
||||
if (options.newTab)
|
||||
return <a
|
||||
href={href}
|
||||
className={options.className}
|
||||
target="_blank" rel="noopener noreferrer" >
|
||||
{Component}
|
||||
</a>
|
||||
|
||||
return <Link
|
||||
to={href}
|
||||
className={options.className} >
|
||||
{Component}
|
||||
</Link>
|
||||
}
|
||||
Reference in New Issue
Block a user