File size: 566 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React from 'react';
import { usePoweredBy } from 'react-instantsearch-hooks';

import { PoweredBy as PoweredByUiComponent } from '../ui/PoweredBy';

import type { PoweredByProps as PoweredByUiComponentProps } from '../ui/PoweredBy';

type UiProps = Pick<PoweredByUiComponentProps, 'url'>;

export type PoweredByProps = Omit<PoweredByUiComponentProps, keyof UiProps>;

export function PoweredBy(props: PoweredByProps) {
  const { url } = usePoweredBy();

  const uiProps: UiProps = {
    url,
  };

  return <PoweredByUiComponent {...props} {...uiProps} />;
}