fix: workspace avatar url won't update (#1817)

This commit is contained in:
Himself65
2023-04-04 12:46:33 -05:00
committed by GitHub
parent 37169ae37d
commit 89f53190db
18 changed files with 1189 additions and 102 deletions

View File

@@ -10,6 +10,8 @@ import preset from './preset.config.mjs';
import { getCommitHash, getGitVersion } from './scripts/gitInfo.mjs';
const require = createRequire(import.meta.url);
const { createVanillaExtractPlugin } = require('@vanilla-extract/next-plugin');
const withVanillaExtract = createVanillaExtractPlugin();
console.info('Runtime Preset', preset);
@@ -189,4 +191,4 @@ if (process.env.PERFSEE_TOKEN) {
);
}
export default config;
export default withVanillaExtract(config);

View File

@@ -53,6 +53,8 @@
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.11",
"@types/webpack-env": "^1.18.0",
"@vanilla-extract/css": "^1.11.0",
"@vanilla-extract/next-plugin": "^2.1.1",
"dotenv": "^16.0.3",
"eslint": "^8.37.0",
"eslint-config-next": "^13.2.4",

View File

@@ -5,6 +5,7 @@ import type React from 'react';
import { useCurrentWorkspace } from '../../../../hooks/current/use-current-workspace';
import type { AllWorkspace } from '../../../../shared';
import { workspaceAvatarStyle } from './index.css';
import {
StyledSelectorContainer,
StyledSelectorWrapper,
@@ -29,9 +30,7 @@ export const WorkspaceSelector: React.FC<WorkspaceSelectorProps> = ({
<StyledSelectorContainer onClick={onClick} data-testid="current-workspace">
<WorkspaceAvatar
data-testid="workspace-avatar"
style={{
flexShrink: 0,
}}
className={workspaceAvatarStyle}
size={40}
workspace={currentWorkspace}
/>

View File

@@ -0,0 +1,4 @@
import { style } from '@vanilla-extract/css';
export const workspaceAvatarStyle = style({
flexShrink: 0,
});