diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 373b08266..cafd7df74 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -6,6 +6,9 @@ on: release_as: description: 'release as' required: true + custom_version: + description: 'custom version' + required: false jobs: publish: @@ -53,6 +56,10 @@ jobs: run: pnpm standard-version --yes --release-as major if: github.event.inputs.release_as == 'major' + - name: increase version (custom) + run: pnpm standard-version --yes --release-as ${{ github.event.inputs.custom_version }} + if: github.event.inputs.release_as == 'custom' + - name: build run: pnpm run build diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fe3b911..1e9192c12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### 3.2.3 (2024-03-01) + + +### Bug Fixes + +* icon size ([6f604b5](https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource/commit/6f604b5b0e8f87ea32c24ff7ba9fc3deccae1988)) + ### 3.2.2 (2024-02-27) ## 3.0.0 (2024-01-18) diff --git a/package.json b/package.json index bb77f5cc8..ba6b6c68a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@amityco/ui-kit-open-source", - "version": "3.2.2", + "version": "3.2.3", "engines": { "node": ">=16", "pnpm": ">=8" diff --git a/src/core/providers/UiKitProvider/index.tsx b/src/core/providers/UiKitProvider/index.tsx index 54e72f126..c67f6507a 100644 --- a/src/core/providers/UiKitProvider/index.tsx +++ b/src/core/providers/UiKitProvider/index.tsx @@ -26,7 +26,6 @@ interface UiKitProviderProps { http?: string; mqtt?: string; }; - authToken?: string; userId: string; displayName: string; customComponents?: CustomComponentType; @@ -47,13 +46,13 @@ interface UiKitProviderProps { onConnectionStatusChange?: (state: Amity.SessionStates) => void; onConnected?: () => void; onDisconnected?: () => void; + getAuthToken?: () => Promise; } const UiKitProvider = ({ apiKey, apiRegion, apiEndpoint, - authToken, userId, displayName, customComponents = {}, @@ -64,6 +63,7 @@ const UiKitProvider = ({ actionHandlers, onConnectionStatusChange, onDisconnected, + getAuthToken, }: UiKitProviderProps) => { const [isConnected, setIsConnected] = useState(false); const [client, setClient] = useState(null); @@ -95,20 +95,25 @@ const UiKitProvider = ({ const currentIsConnected = ASCClient.isConnected(); if (!currentIsConnected) { - await ASCClient.login( - { userId, displayName, authToken }, - { - sessionWillRenewAccessToken(renewal) { - // secure mode - if (authToken) { - renewal.renewWithAuthToken(authToken); - return; - } - - renewal.renew(); - }, + let params: Amity.ConnectClientParams = { userId, displayName }; + + if (getAuthToken) { + const authToken = await getAuthToken(); + params = { ...params, authToken }; + } + + await ASCClient.login(params, { + async sessionWillRenewAccessToken(renewal: Amity.AccessTokenRenewal) { + // secure mode + if (getAuthToken) { + const authToken = await getAuthToken(); + renewal.renewWithAuthToken(authToken); + return; + } + + renewal.renew(); }, - ); + }); } setIsConnected(true); diff --git a/src/social/components/CommentLikeButton/styles.tsx b/src/social/components/CommentLikeButton/styles.tsx index e8fcc405c..db51cec4d 100644 --- a/src/social/components/CommentLikeButton/styles.tsx +++ b/src/social/components/CommentLikeButton/styles.tsx @@ -16,9 +16,10 @@ export const StyledLikeButton = styled(SecondaryButton)` } `; -export const BaseLikeIcon = styled(ThumbsUp)<{ icon?: ReactNode }>` - font-size: 16px; -`; +export const BaseLikeIcon = styled(ThumbsUp).attrs<{ icon?: ReactNode }>({ + width: 16, + height: 16, +})``; export const IsLikedLikeIcon = styled(BaseLikeIcon)<{ icon?: ReactNode }>` ${isLikedStyle} diff --git a/src/social/components/post/LikeButton/styles.tsx b/src/social/components/post/LikeButton/styles.tsx index 54057d1a3..21dd4b2ab 100644 --- a/src/social/components/post/LikeButton/styles.tsx +++ b/src/social/components/post/LikeButton/styles.tsx @@ -12,7 +12,10 @@ export const StyledLikeButton = styled(SecondaryButton)` ${({ active }) => active && isLikedStyle} `; -export const BaseLikeIcon = styled(ThumbsUp)<{ icon?: ReactNode }>` +export const BaseLikeIcon = styled(ThumbsUp).attrs<{ icon?: ReactNode }>({ + width: 16, + height: 16, +})` font-size: 16px; margin-right: 5px; `;