Fix Nextjs build errors

This commit is contained in:
Justin Edmund 2023-07-04 00:36:30 -07:00
parent e22183fa63
commit 8bdce71c7b
5 changed files with 14 additions and 6 deletions

View file

@ -8,7 +8,7 @@ import styles from './index.module.scss'
interface Props extends SwitchPrimitive.SwitchProps {} interface Props extends SwitchPrimitive.SwitchProps {}
export const LanguageSwitch = React.forwardRef<HTMLButtonElement, Props>( export const LanguageSwitch = React.forwardRef<HTMLButtonElement, Props>(
function languageSwitch( function LanguageSwitch(
{ children }: PropsWithChildren<Props>, { children }: PropsWithChildren<Props>,
forwardedRef forwardedRef
) { ) {

View file

@ -18,7 +18,7 @@ const defaultProps = {
showCounter: false, showCounter: false,
} }
const Input = React.forwardRef<HTMLInputElement, Props>(function input( const Input = React.forwardRef<HTMLInputElement, Props>(function Input(
{ {
value: initialValue, value: initialValue,
bound, bound,

View file

@ -31,7 +31,7 @@ interface Props
overlayVisible?: boolean overlayVisible?: boolean
} }
const Select = React.forwardRef<HTMLButtonElement, Props>(function select( const Select = React.forwardRef<HTMLButtonElement, Props>(function Select(
props: Props, props: Props,
forwardedRef forwardedRef
) { ) {

View file

@ -8,7 +8,7 @@ interface Props extends React.ComponentProps<'div'> {
value?: string value?: string
} }
const Textarea = React.forwardRef<HTMLDivElement, Props>(function textarea( const Textarea = React.forwardRef<HTMLDivElement, Props>(function Textarea(
{ bound, value: initialValue, ...props }: Props, { bound, value: initialValue, ...props }: Props,
forwardedRef forwardedRef
) { ) {

View file

@ -34,7 +34,7 @@ interface Props {
new: boolean new: boolean
editable: boolean editable: boolean
remixCallback: () => void remixCallback: () => void
updateCallback: (details: DetailsObject) => void updateCallback: (details: DetailsObject) => Promise<any>
} }
const PartyFooter = (props: Props) => { const PartyFooter = (props: Props) => {
@ -48,6 +48,7 @@ const PartyFooter = (props: Props) => {
// State: Component // State: Component
const [currentSegment, setCurrentSegment] = useState(0) const [currentSegment, setCurrentSegment] = useState(0)
const [detailsOpen, setDetailsOpen] = useState(false)
const [remixAlertOpen, setRemixAlertOpen] = useState(false) const [remixAlertOpen, setRemixAlertOpen] = useState(false)
const [remixToastOpen, setRemixToastOpen] = useState(false) const [remixToastOpen, setRemixToastOpen] = useState(false)
@ -160,6 +161,11 @@ const PartyFooter = (props: Props) => {
}) })
} }
// Actions: Edit info
function handleDetailsOpenChange(open: boolean) {
setDetailsOpen(open)
}
// Actions: Remix team // Actions: Remix team
function remixTeamCallback() { function remixTeamCallback() {
setRemixToastOpen(true) setRemixToastOpen(true)
@ -217,8 +223,10 @@ const PartyFooter = (props: Props) => {
<h3>{t('footer.description.empty')}</h3> <h3>{t('footer.description.empty')}</h3>
{props.editable && ( {props.editable && (
<EditPartyModal <EditPartyModal
open={detailsOpen}
party={props.party} party={props.party}
updateCallback={props.updateCallback} onOpenChange={handleDetailsOpenChange}
updateParty={props.updateCallback}
> >
<Button <Button
leftAccessoryIcon={<EditIcon />} leftAccessoryIcon={<EditIcon />}