Also unpack React / don't directly import React (#8384)

pull/8364/head
Alex van Andel 2023-04-19 20:24:34 +02:00 committed by GitHub
parent 9e17149e5e
commit d91b451d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import Head from "next/head";
import React, { createContext, useContext, useState, useEffect } from "react";
import { createContext, useContext, useState, useEffect } from "react";
import type { ReactNode } from "react";
import { APP_NAME } from "@calcom/lib/constants";
@ -7,7 +8,7 @@ type MetaType = {
title: string;
description: string;
backButton?: boolean;
CTA?: React.ReactNode;
CTA?: ReactNode;
};
const initialMeta: MetaType = {
@ -27,7 +28,7 @@ export function useMeta() {
return useContext(MetaContext);
}
export function MetaProvider({ children }: { children: React.ReactNode }) {
export function MetaProvider({ children }: { children: ReactNode }) {
const [value, setValue] = useState(initialMeta);
const setMeta = (newMeta: Partial<MetaType>) => {
setValue((v) => ({ ...v, ...newMeta }));