19 lines
377 B
TypeScript
19 lines
377 B
TypeScript
import React from 'react';
|
|
|
|
import useData from './useData';
|
|
|
|
import type { ValueOrNestedValue } from '@staticcms/core/interface';
|
|
import type { FC } from 'react';
|
|
|
|
export interface DataProps {
|
|
path: string;
|
|
value: ValueOrNestedValue;
|
|
}
|
|
|
|
const Data: FC<DataProps> = ({ path, value }) => {
|
|
const data = useData(value, path);
|
|
return <>{data}</>;
|
|
};
|
|
|
|
export default Data;
|