Skip to content

Commit

Permalink
Hide name field if loggedin
Browse files Browse the repository at this point in the history
  • Loading branch information
ATechAdventurer committed Dec 11, 2023
1 parent 2a46e6c commit ad6950e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/ticket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import styles from '@/styles/ticket.module.css';
import { Button, Input, Select, SelectItem, Spacer, Textarea } from '@nextui-org/react';
import DefaultLayout from '@/layouts/default';

import { useSession } from 'next-auth/react';
export const reasons = [
{
label: 'Issue With Machine',
Expand Down Expand Up @@ -37,6 +37,7 @@ export const reasons = [
];

export default function SupportTicket() {
const session = useSession();
const [reason, setReason] = useState('');
const [message, setMessage] = useState('');

Expand Down Expand Up @@ -66,6 +67,7 @@ export default function SupportTicket() {
onChange={(e) => setMessage(e.target.value)}
required={false}
className={styles.bigText}
hidden={!session}
/>

<Spacer y={3} />
Expand Down

0 comments on commit ad6950e

Please sign in to comment.