mirror of
				https://github.com/cinnyapp/cinny.git
				synced 2025-11-04 14:30:29 +03:00 
			
		
		
		
	hide message button from own profile
This commit is contained in:
		
							parent
							
								
									78a0d11f24
								
							
						
					
					
						commit
						19db9cf074
					
				
					 1 changed files with 21 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -95,25 +95,27 @@ export function UserRoomProfile({ userId }: UserRoomProfileProps) {
 | 
			
		|||
        <Box direction="Column" gap="400">
 | 
			
		||||
          <Box gap="400" alignItems="Start">
 | 
			
		||||
            <UserHeroName displayName={displayName} userId={userId} />
 | 
			
		||||
            <Box shrink="No">
 | 
			
		||||
              <Button
 | 
			
		||||
                size="300"
 | 
			
		||||
                variant="Primary"
 | 
			
		||||
                fill="Solid"
 | 
			
		||||
                radii="300"
 | 
			
		||||
                disabled={directMessageState.status === AsyncStatus.Loading}
 | 
			
		||||
                before={
 | 
			
		||||
                  directMessageState.status === AsyncStatus.Loading ? (
 | 
			
		||||
                    <Spinner size="50" variant="Primary" fill="Solid" />
 | 
			
		||||
                  ) : (
 | 
			
		||||
                    <Icon size="50" src={Icons.Message} filled />
 | 
			
		||||
                  )
 | 
			
		||||
                }
 | 
			
		||||
                onClick={handleMessage}
 | 
			
		||||
              >
 | 
			
		||||
                <Text size="B300">Message</Text>
 | 
			
		||||
              </Button>
 | 
			
		||||
            </Box>
 | 
			
		||||
            {userId !== myUserId && (
 | 
			
		||||
              <Box shrink="No">
 | 
			
		||||
                <Button
 | 
			
		||||
                  size="300"
 | 
			
		||||
                  variant="Primary"
 | 
			
		||||
                  fill="Solid"
 | 
			
		||||
                  radii="300"
 | 
			
		||||
                  disabled={directMessageState.status === AsyncStatus.Loading}
 | 
			
		||||
                  before={
 | 
			
		||||
                    directMessageState.status === AsyncStatus.Loading ? (
 | 
			
		||||
                      <Spinner size="50" variant="Primary" fill="Solid" />
 | 
			
		||||
                    ) : (
 | 
			
		||||
                      <Icon size="50" src={Icons.Message} filled />
 | 
			
		||||
                    )
 | 
			
		||||
                  }
 | 
			
		||||
                  onClick={handleMessage}
 | 
			
		||||
                >
 | 
			
		||||
                  <Text size="B300">Message</Text>
 | 
			
		||||
                </Button>
 | 
			
		||||
              </Box>
 | 
			
		||||
            )}
 | 
			
		||||
          </Box>
 | 
			
		||||
          {directMessageState.status === AsyncStatus.Error && (
 | 
			
		||||
            <Text style={{ color: color.Critical.Main }}>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue