This file contains 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 { useEffect, useState } from 'react'; | |
import { Flex, Select, Box, Text, Input, Spinner, Icon, Button } from '@chakra-ui/react'; | |
import { useRouter } from 'next/router'; | |
import { MdCancel } from 'react-icons/md'; | |
import Image from 'next/image'; | |
import { filterData, getFilterValues } from '../utils/filterData'; | |
import { baseUrl, fetchApi } from '../utils/fetchApi'; | |
import noresult from '../assets/images/noresult.svg'; |
This file contains 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
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
html, | |
body { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} |
This file contains 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
// 1. NewsCard/styles.js: | |
import { makeStyles } from '@material-ui/core/styles'; | |
export default makeStyles({ | |
media: { | |
height: 250, | |
}, | |
border: { | |
border: 'solid', | |
}, |
This file contains 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, useEffect, useContext } from "react"; | |
import Modal from 'react-modal'; | |
import { Line } from 'rc-progress'; | |
import { Text } from 'react-native'; | |
import chatContext, {controlMessageEnum} from './ChatContext'; | |
import { PollContext } from './PollContext'; | |
import styles from './pollStyles'; |
This file contains 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
export function buildQuery(params: BuildQueryParams) { | |
const { type, query, category, page = 1, perPage = 20 } = params; | |
const conditions = [`*[_type=="${type}"`]; | |
if (query) conditions.push(`title match "*${query}*"`); | |
if (category && category !== "all") { | |
conditions.push(`category == "${category}"`); | |
} |
This file contains 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 from 'react'; | |
import moment from 'moment'; | |
import Image from 'next/image'; | |
import Link from 'next/link'; | |
const FeaturedPostCard = ({ post }) => ( | |
<div className="relative h-72"> | |
<div className="absolute rounded-lg bg-center bg-no-repeat bg-cover shadow-md inline-block w-full h-72" style={{ backgroundImage: `url('${post.featuredImage.url}')` }} /> | |
<div className="absolute rounded-lg bg-center bg-gradient-to-b opacity-50 from-gray-400 via-gray-700 to-black w-full h-72" /> | |
<div className="flex flex-col rounded-lg p-4 items-center justify-center absolute w-full h-full"> |
This file contains 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
module.exports = ({ name, price1, price2, receiptId }) => { | |
const today = new Date(); | |
return ` | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>PDF Result Template</title> | |
<style> | |
.invoice-box { |
This file contains 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
:root{ | |
--text-primary:#000; | |
--bgPrimary:#fff; | |
--bgSecondary: #F9F9F9; | |
--pink: #0071bd; | |
--light-blue: #e6f7ff; | |
--border: #d9d9d9; | |
} |
This file contains 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 useStyles = makeStyles((theme) => ({ | |
appBar: { | |
borderRadius: 15, | |
margin: '30px 100px', | |
display: 'flex', | |
flexDirection: 'row', | |
justifyContent: 'center', | |
alignItems: 'center', | |
width: '600px', | |
border: '2px solid black', |
This file contains 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 url("https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@100;300;400;500;700;800;900&display=swap"); | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
font-family: "Alegreya Sans", sans-serif; | |
} | |
body { |