Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
plugins: [
'prettier-plugin-tailwindcss',
require.resolve('@trivago/prettier-plugin-sort-imports'),
],
importOrder: [
'^@/(.*)$',
'lucide-react',
'^[./]',
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
}
7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Contributing to Review App
# Contributing to Review App

Thank you for your interest in contributing to Review App! We welcome contributions from the community to help improve and enhance the project. Please take a moment to read through the following guidelines to get started.

## Table of Contents

- [Getting Started](#getting-started)
- [Contributing Guidelines](#contributing-guidelines)
- [Setting Up the Development Environment](#setting-up-the-development-environment)
Expand Down Expand Up @@ -101,6 +102,7 @@ To set up the development environment locally, follow these steps:
When you're ready to submit your changes, create a pull request (PR) following our guidelines. Be sure to provide a clear description of your changes in the PR, and one of our maintainers will review it.

## Backend Reference Link

You can find the reference link to the backend of the reivew-app here:
`https://github.com/piyushgarg-dev/review-app-api`

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

![image](https://github.com/priyankeshh/review-app/assets/102135464/ce5d8d2b-c130-4a31-b6c1-200d6a6d862e)


Review App is a web application built using [Next.js](https://nextjs.org/), bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). It simplifies the process of adding a review system to your website. Instead of creating a whole new backend for the review system, you can create a review application on Review App and easily integrate it into your website.

With Review App, you can gather valuable feedback and reviews from your website's users. Whether you run an e-commerce site, a blog, or any other online platform, adding a review feature can help you build trust and improve user engagement.

## Table of Contents

- [Getting Started](#getting-started)
- [Key Features](#key-features)
- [How It Works](#how-it-works)
Expand Down Expand Up @@ -92,4 +92,4 @@ We welcome contributions from the community to enhance Review App further. If yo

This project is licensed under the [GNU General Public Licence v3.0](https://github.com/piyushgarg-dev/review-app/blob/main/LICENCE).

![Repo Activity Graph](https://repobeats.axiom.co/api/embed/f6281bf7178187a69dc4999d7486a4d8a1a73374.svg "Repobeats analytics image")
![Repo Activity Graph](https://repobeats.axiom.co/api/embed/f6281bf7178187a69dc4999d7486a4d8a1a73374.svg 'Repobeats analytics image')
3 changes: 2 additions & 1 deletion components/Dashboard/DashboardMobileSidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Menu } from 'lucide-react'
import { useEffect, useRef } from 'react'

import DashboardSidebar from '@/components/Dashboard/DashboardSidebar'
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'

import { Menu } from 'lucide-react'

const DashboardMobileSidebar: React.FC = () => {
const ref = useRef(false)

Expand Down
21 changes: 11 additions & 10 deletions components/Dashboard/DashboardSidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import {
ChevronDown,
HeartIcon,
Import,
Inbox,
Search,
TagIcon,
UserCircle2,
Users,
} from 'lucide-react'
import Image from 'next/image'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
Expand All @@ -22,6 +12,17 @@ import { useSelectedProject } from '@/hooks/query/project'
import { useCurrentUser } from '@/hooks/query/user'
import { cn } from '@/lib/utils'

import {
ChevronDown,
HeartIcon,
Import,
Inbox,
Search,
TagIcon,
UserCircle2,
Users,
} from 'lucide-react'

const routes = [
{
name: 'COLLECT',
Expand Down
61 changes: 31 additions & 30 deletions components/Dashboard/FormEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import {
AtSign,
Briefcase,
Building,
Globe,
ImagePlus,
User,
} from 'lucide-react'
import Image from 'next/image'
import { useCallback, useState } from 'react'
import { HexColorPicker } from 'react-colorful'
import { useForm } from 'react-hook-form'
import toast from 'react-hot-toast'

import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from '@/components/ui/accordion'
import {
Dialog,
DialogClose,
Expand All @@ -20,11 +18,26 @@ import {
DialogTrigger,
dialogClose,
} from '@/components/ui/dialog'
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/popover'
import { Switch } from '@/components/ui/switch'
import { Textarea } from '@/components/ui/textarea'
import type { Form as TReviewForm } from '@/gql/graphql'
import { useUpdateForm } from '@/hooks/mutation/form'
import advance_icon from '@/public/FormEditIcons/advance_icon.svg'
import customer_details_page_icon from '@/public/FormEditIcons/customer_details_page_icon.svg'
import design_icon from '@/public/FormEditIcons/design_icon.svg'
Expand All @@ -34,31 +47,19 @@ import response_page_icon from '@/public/FormEditIcons/response_page_icon.svg'
import thankyou_page_icon from '@/public/FormEditIcons/thankyou_page_icon.svg'
import welcome_page_icon from '@/public/FormEditIcons/welcome_page_icon.svg'
import logo from '@/public/logo.svg'
import { FormStepId } from '@/types'

import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from '@/components/ui/accordion'
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { Switch } from '@/components/ui/switch'
import { Textarea } from '@/components/ui/textarea'
import type { Form as TReviewForm } from '@/gql/graphql'
import { useUpdateForm } from '@/hooks/mutation/form'
AtSign,
Briefcase,
Building,
Globe,
ImagePlus,
User,
} from 'lucide-react'

import { Button } from '../ui/button'
import { Checkbox } from '../ui/checkbox'
import { FormStepId } from '@/types'

export interface FormEditProps {
reviewForm: TReviewForm
Expand Down Expand Up @@ -164,7 +165,7 @@ const FormEdit: React.FC<FormEditProps> = ({ reviewForm, onStepChange }) => {
src={logoUrl ? logoUrl : logo}
width={104}
height={104}
className="group-hover:brightness-105 bg-cover"
className="bg-cover group-hover:brightness-105"
alt="logo"
/>
</DialogTrigger>
Expand Down
22 changes: 12 additions & 10 deletions components/Dashboard/FormPane.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Copy, Pencil, Share2, Trash2 } from 'lucide-react'
import Image from 'next/image'
import Link from 'next/link'
import toast from 'react-hot-toast'
import { useRouter } from 'next/router'
import { useState } from 'react'
import toast from 'react-hot-toast'

import { Checkbox } from '@/components/ui/checkbox'
import {
Tooltip,
Expand All @@ -20,6 +20,8 @@ import {
getTimeDistance,
} from '@/utils/time'

import { Copy, Pencil, Share2, Trash2 } from 'lucide-react'

interface SelectionStateType {
[key: string | number]: boolean
}
Expand All @@ -35,7 +37,7 @@ const actionButtons = [
},
{
label: 'Copy',
icon: Copy
icon: Copy,
},
{
label: 'Delete',
Expand All @@ -51,18 +53,16 @@ const FormPane: React.FC = () => {
{} as SelectionStateType
)

const handleCopyClick = async (link:string) => {
const handleCopyClick = async (link: string) => {
try {
await navigator.clipboard.writeText(link);
await navigator.clipboard.writeText(link)
toast.success('Link Copied')

} catch (error) {
console.error('Failed to copy text: ', error);
console.error('Failed to copy text: ', error)
}
};
}
const router = useRouter()


const handleCheck = (id: string | number) => {
setSelectedRow((prev) => ({
...prev,
Expand Down Expand Up @@ -130,7 +130,9 @@ const FormPane: React.FC = () => {
? router.push(
`/dashboard/${project?.subdomain}/forms/edit/${form?.id}`
)
:label.toLowerCase() === 'copy'?handleCopyClick(`http://localhost/${form?.slug}`):null
: label.toLowerCase() === 'copy'
? handleCopyClick(`http://localhost/${form?.slug}`)
: null
}
className={cn(
'offset_ring rounded-md p-1.5 hover:bg-gray-100 dark:hover:bg-gray-800',
Expand Down
8 changes: 5 additions & 3 deletions components/Dashboard/FormPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Laptop, Smartphone } from 'lucide-react'
import { useState } from 'react'

import { Form } from '@/gql/graphql'
import { cn } from '@/lib/utils'
import ReviewForm from './ReviewForm'
import { FormStepId } from '@/types'

import { Laptop, Smartphone } from 'lucide-react'

import ReviewForm from './ReviewForm'

interface FormPreviewProps {
reviewForm: Form
currentStepId: FormStepId
Expand All @@ -21,7 +23,7 @@ const FormPreview: React.FC<FormPreviewProps> = (props) => {
'mb-10': isMobile,
})}
>
<div className="mb-4 flex justify-center rounded-lg bg-gray-300 dark:bg-gray-700 p-1">
<div className="mb-4 flex justify-center rounded-lg bg-gray-300 p-1 dark:bg-gray-700">
<button
className={cn(
'offset_ring rounded-md p-1.5 transition-all',
Expand Down
5 changes: 3 additions & 2 deletions components/Dashboard/ProjectSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Check, ChevronsUpDown, FolderOpenDot, PlusCircle } from 'lucide-react'
import { useRouter } from 'next/router'
import React, { useCallback } from 'react'

Expand All @@ -18,8 +17,10 @@ import {
PopoverTrigger,
} from '@/components/ui/popover'
import { useSelectedProject, useUserProjects } from '@/hooks/query/project'
import { useProjectModal } from '@/store/useProjectModal'
import { cn } from '@/lib/utils'
import { useProjectModal } from '@/store/useProjectModal'

import { Check, ChevronsUpDown, FolderOpenDot, PlusCircle } from 'lucide-react'

const ProjectSwitch: React.FC = () => {
const { projects } = useUserProjects()
Expand Down
4 changes: 2 additions & 2 deletions components/Dashboard/ReviewForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HeartFilledIcon, StarFilledIcon } from '@radix-ui/react-icons'
import { ArrowLeft, Pencil } from 'lucide-react'
import Image from 'next/image'
import { useState } from 'react'

Expand All @@ -12,6 +11,8 @@ import { cn } from '@/lib/utils'
import user_img from '@/public/FormEditIcons/user.png'
import { FormStepId } from '@/types'

import { ArrowLeft, Pencil } from 'lucide-react'

interface ReviewFormProps {
formData: ReviewFormData
currentStepId: FormStepId
Expand Down Expand Up @@ -284,7 +285,6 @@ const ReviewForm: React.FC<ReviewFormProps> = (props) => {
<HeartFilledIcon className="h-6 w-6 text-black" />
</div>
<h1 className="text-xl font-bold dark:text-black">

You just sent a testimonial with Review
</h1>
<p className="my-2 text-lg text-gray-500">
Expand Down
Loading