This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { ChromeMessage, Sender } from "../types"; | |
| type MessageResponse = (response?: any) => void; | |
| const validateSender = ( | |
| message: ChromeMessage, | |
| sender: chrome.runtime.MessageSender | |
| ) => { | |
| return sender.id === chrome.runtime.id && message.from === Sender.React; | |
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "name": "Chrome React Extension", | |
| "description": "Template for creating Chrome extensions with React", | |
| "version": "1.0", | |
| "manifest_version": 3, | |
| "action": { | |
| "default_popup": "index.html", | |
| "default_title": "Open the popup" | |
| }, | |
| "icons": { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
| module.exports = { | |
| webpack: { | |
| configure: (webpackConfig, { env, paths }) => { | |
| return { | |
| ...webpackConfig, | |
| entry: { | |
| main: [ | |
| env === "development" && | |
| require.resolve("react-dev-utils/webpackHotDevClient"), | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "name": "Chrome React Extension", | |
| "description": "Template for creating Chrome extensions with React", | |
| "version": "1.0", | |
| "manifest_version": 3, | |
| "action": { | |
| "default_popup": "index.html", | |
| "default_title": "Open the popup" | |
| }, | |
| "icons": { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | body { | |
| width: 600px; | |
| height: 400px; | |
| margin: 0; | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | |
| 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | |
| sans-serif; | |
| -webkit-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "name": "Chrome React Extension", | |
| "description": "Template for creating Crome extensions with React", | |
| "version": "1.0", | |
| "manifest_version": 3, | |
| "action": { | |
| "default_popup": "index.html", | |
| "default_title": "Open the popup" | |
| }, | |
| "icons": { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { gql, useQuery } from "@apollo/client"; | |
| import { initializeApollo, addApolloState } from "../lib/apolloClient"; | |
| const POSTS_PER_PAGE = 10; | |
| const GET_POSTS = gql` | |
| query getPosts($first: Int!, $after: String) { | |
| posts(first: $first, after: $after) { | |
| # etc. | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { AppContext, AppInitialProps } from 'next/app'; | |
| import { ApolloProvider } from '@apollo/client'; | |
| import { useApollo } from '../lib/apollo-client'; | |
| import '../styles/globals.css'; | |
| function MyApp({ Component, pageProps }: AppContext & AppInitialProps) { | |
| const apolloClient = useApollo(pageProps); | |
| return ( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { useMemo } from 'react'; | |
| import { | |
| ApolloClient, | |
| HttpLink, | |
| InMemoryCache, | |
| NormalizedCacheObject, | |
| } from '@apollo/client'; | |
| import { relayStylePagination } from '@apollo/client/utilities'; | |
| import merge from 'deepmerge'; | |
| import isEqual from 'lodash/isEqual'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { useState, useRef } from 'react'; | |
| import CustomModal from './custom-modal'; | |
| const Modal = () => { | |
| const [open, setOpen] = useState<boolean>(false); | |
| const ref: HTMLDivElement | any = useRef<HTMLDivElement>(null); | |
| const onClose = (): void => { | |
| setOpen(false); | |
| }; | 
NewerOlder