Ignore:
Timestamp:
03/01/26 22:55:00 (4 months ago)
Author:
Mihail <mihail2.naumov@…>
Branches:
main
Children:
ff3a614
Parents:
1d7e8fe
Message:

Fixed auth issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/ComponentDialog.tsx

    r1d7e8fe r41825d5  
    249249            </Box>
    250250
    251             <Button
    252                 fullWidth
    253                 variant="contained"
    254                 startIcon={<AddCircleIcon/>}
    255                 onClick={() => setSuggestOpen(true)}
    256                 sx={{
    257                     mt: 2,
    258                     bgcolor: '#ff8201',
    259                     fontWeight: 'bold',
    260                     fontSize: '0.875rem',
    261                     '&:hover': {bgcolor: '#e67300'}
    262                 }}
    263             >
    264                 Suggest Component
    265             </Button>
     251            {userId && (
     252                <Button
     253                    fullWidth
     254                    variant="contained"
     255                    startIcon={<AddCircleIcon/>}
     256                    onClick={() => setSuggestOpen(true)}
     257                    sx={{
     258                        mt: 2,
     259                        bgcolor: '#ff8201',
     260                        fontWeight: 'bold',
     261                        fontSize: '0.875rem',
     262                        '&:hover': {bgcolor: '#e67300'}
     263                    }}
     264                >
     265                    Suggest Component
     266                </Button>
     267            )}
    266268        </Box>
    267     ), [tempSearchQuery, sortOrder, selectedBrands, availableBrands, priceRange]);
     269    ), [tempSearchQuery, sortOrder, selectedBrands, availableBrands, priceRange, userId]);
    268270
    269271    if (!open) return null;
Note: See TracChangeset for help on using the changeset viewer.