Skip to content

Commit

Permalink
Merge pull request #149 from hocgin/feature-scss
Browse files Browse the repository at this point in the history
Feature scss
  • Loading branch information
hocgin authored Nov 3, 2023
2 parents 590682a + 0cb6efa commit 3ff978d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 36 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
"zeed-dom": "0.9.19"
},
"peerDependencies": {
"@hocgin/ahooks-kit": "^2.0.125",
"@hocgin/hkit": "^2.0.125",
"@hocgin/ahooks-kit": "^2.0.126",
"@hocgin/hkit": "^2.0.126",
"antd": "^5.1.2",
"react": "18.x",
"react-dom": "18.x"
Expand Down
58 changes: 28 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/Header/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ const HeaderMenu: React.FC<Props> = ({ menus, prefix, suffix, ...props }) => {
let [isOpenMenu, setIsOpenMenu] = useState(responsive?.middle);
let [user, setUser] = useState<any>(PromiseKit.CacheKit.getUser());
let { run, loading } = useRequest(
async () => {
return await DoveService.getCurrentUser(false);
},
async () => await DoveService.getCurrentUser(false),
{
manual: true,
onSuccess: (data) => {
Expand Down Expand Up @@ -91,7 +89,9 @@ const HeaderMenu: React.FC<Props> = ({ menus, prefix, suffix, ...props }) => {
) : (
<a
className={`${prefixCls}-login`}
href={`/login?redirectUrl=${window?.location?.href}`}
href={`/login?redirectUrl=${
typeof window !== 'undefined' ? window?.location?.href : ''
}`}
>
登陆
</a>
Expand Down

0 comments on commit 3ff978d

Please sign in to comment.