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
// Assuming you're using a modern import method | |
import { jsPDF } from "jspdf"; | |
// Create a jsPDF instance | |
const doc = new jsPDF(); | |
// Your HTML string | |
const htmlString = ` | |
<h1>Hello World</h1> | |
<p>This is a basic example of HTML to PDF conversion.</p> |
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 { yupResolver } from '@hookform/resolvers/yup'; | |
import { useForm } from 'react-hook-form'; | |
import * as Yup from 'yup'; | |
import LoadingButton from '@mui/lab/LoadingButton'; | |
import Box from '@mui/material/Box'; | |
import Card from '@mui/material/Card'; | |
import Stack from '@mui/material/Stack'; | |
import Grid from '@mui/material/Unstable_Grid2'; |
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
// Purpose: Configure Firebase rewrite rules for Next.js static routing. | |
// This script is intended for statically generated Next.js projects (built with 'next build' and 'next export'). | |
// Inspired by the discussion at: https://github.com/firebase/firebase-js-sdk/discussions/4980 | |
import fsPromises from 'fs/promises'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
async function main() { | |
const args = process.argv.slice(2); // Get command-line arguments, excluding 'node' and script name |
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
[ | |
{ | |
"id": 8626465472824, | |
"title": "Black Leather Bag", | |
"body_html": "<p>Womens black leather bag, with ample space. Can be worn over the shoulder, or remove straps to carry in your hand.</p>", | |
"vendor": "partners-demo", | |
"product_type": "", | |
"created_at": "2023-09-07T14:36:16+05:00", | |
"handle": "black-leather-bag", | |
"updated_at": "2023-09-07T14:36:22+05:00", |
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 { Button, Dialog, DialogContent, Divider, Grid, MenuItem, Stack, TextField, Typography } from '@mui/material'; | |
import PropTypes from 'prop-types'; | |
import { useForm } from 'react-hook-form'; | |
import * as Yup from 'yup'; | |
import { yupResolver } from '@hookform/resolvers/yup'; | |
import { createFilterOptions } from "@mui/material/Autocomplete"; | |
import { collection, doc, setDoc } from 'firebase/firestore'; | |
import { useSnackbar } from 'notistack'; |
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
/* | |
This example requires some changes to your config: | |
``` | |
// tailwind.config.js | |
module.exports = { | |
// ... | |
plugins: [ | |
// ... | |
require('@tailwindcss/forms'), |
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
/* | |
This example requires some changes to your config: | |
``` | |
// tailwind.config.js | |
module.exports = { | |
// ... | |
plugins: [ | |
// ... | |
require('@tailwindcss/forms'), |
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
/* | |
This example requires some changes to your config: | |
``` | |
// tailwind.config.js | |
module.exports = { | |
// ... | |
plugins: [ | |
// ... | |
require('@tailwindcss/forms'), |
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 { createSlice } from '@reduxjs/toolkit'; | |
import { addDoc, arrayRemove, arrayUnion, collection, doc, getDoc, getDocs, query, setDoc, Timestamp, updateDoc, where } from 'firebase/firestore'; | |
// eslint-disable-next-line import/no-cycle | |
import { DB } from '../../auth/FirebaseApp'; | |
const COMPANY_ACTIONS = { | |
CREATE: 'create', | |
UPDATE: 'update', | |
} |
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
[ | |
{ | |
"id": "a299691ac4a", | |
"name": "List", | |
"defaultValue": false, | |
"title": "ddddd", | |
"child": [ | |
{ | |
"id": "9691ac4ab49", |