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 { useMutation, useQueryClient } from 'react-query'; | |
| const queryClient = useQueryClient(); | |
| const handleFileChange = event => { | |
| setBookName(event.target.files[0].name); | |
| setSelectedBook(event.target.files[0]); | |
| }; | |
| const handleFileUpload = event => { | |
| event.preventDefault(); |
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, { useEffect, useState, useRef, useCallback } from "react"; | |
| import { createPortal } from "react-dom"; | |
| import * as PDFJS from "pdfjs-dist/build/pdf"; | |
| import PDFJSWORKER from "pdfjs-dist/build/pdf.worker.entry"; | |
| import "./misc/textLayer"; | |
| import "./misc/textLayer.css"; | |
| window.PDFJS = PDFJS; | |
| export default function PdfViewer({ url }) { |
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 styled,{css} from 'styled-components'; | |
| const size = { | |
| small: 400, | |
| medium: 960, | |
| large: 1140, | |
| }; | |
| const mediaQuery = Object.keys(size).reduce((acc, label) => { | |
| acc[label] = (...args) => css` | |
| @media (min-width: ${size[label]}px) { |
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
| Scaffold( | |
| appBar: AppBar( | |
| title: AutoSizeText('Doctors List'), | |
| bottom: PreferredSize(child: Row(children: <Widget>[ | |
| customButton((){},Icons.filter,'Filter'), | |
| customButton((){},Icons.filter,'Filter'), | |
| customButton((){},Icons.filter,'Filter'), | |
| ],), preferredSize: Size.fromHeight(70)), | |
| ) | |
| ); |
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
| Scaffold( | |
| appBar: AppBar( | |
| title: AutoSizeText('Doctors List'), | |
| bottom: PreferredSize(child: Row(children: <Widget>[ | |
| customButton((){},Icons.filter,'Filter'), | |
| customButton((){},Icons.filter,'Filter'), | |
| customButton((){},Icons.filter,'Filter'), | |
| ],), preferredSize: Size.fromHeight(70)), | |
| ) | |
| ); |